mesa: Remove target parameter from dd_function_table::UnmapBuffer

No driver used that parameter, and most drivers ended up with a bunch
of unused-parameter warnings because it was there.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
Ian Romanick
2011-08-21 16:59:30 -07:00
parent 0457655035
commit 56f0c00f12
26 changed files with 53 additions and 75 deletions

View File

@@ -699,7 +699,7 @@ static void brw_prepare_indices(struct brw_context *brw)
&bo, &offset); &bo, &offset);
brw->ib.start_vertex_offset = offset / ib_type_size; brw->ib.start_vertex_offset = offset / ib_type_size;
ctx->Driver.UnmapBuffer(ctx, GL_ELEMENT_ARRAY_BUFFER_ARB, bufferobj); ctx->Driver.UnmapBuffer(ctx, bufferobj);
} else { } else {
/* Use CMD_3D_PRIM's start_vertex_offset to avoid re-uploading /* Use CMD_3D_PRIM's start_vertex_offset to avoid re-uploading
* the index buffer state when we're just moving the start index * the index buffer state when we're just moving the start index

View File

@@ -41,8 +41,7 @@
#include "intel_regions.h" #include "intel_regions.h"
static GLboolean static GLboolean
intel_bufferobj_unmap(struct gl_context * ctx, intel_bufferobj_unmap(struct gl_context * ctx, struct gl_buffer_object *obj);
GLenum target, struct gl_buffer_object *obj);
/** Allocates a new drm_intel_bo to store the data for the buffer object. */ /** Allocates a new drm_intel_bo to store the data for the buffer object. */
static void static void
@@ -122,7 +121,7 @@ intel_bufferobj_free(struct gl_context * ctx, struct gl_buffer_object *obj)
* (though it does if you call glDeleteBuffers) * (though it does if you call glDeleteBuffers)
*/ */
if (obj->Pointer) if (obj->Pointer)
intel_bufferobj_unmap(ctx, 0, obj); intel_bufferobj_unmap(ctx, obj);
free(intel_obj->sys_buffer); free(intel_obj->sys_buffer);
if (intel_obj->region) { if (intel_obj->region) {
@@ -507,8 +506,7 @@ intel_bufferobj_flush_mapped_range(struct gl_context *ctx, GLenum target,
* Called via glUnmapBuffer(). * Called via glUnmapBuffer().
*/ */
static GLboolean static GLboolean
intel_bufferobj_unmap(struct gl_context * ctx, intel_bufferobj_unmap(struct gl_context * ctx, struct gl_buffer_object *obj)
GLenum target, struct gl_buffer_object *obj)
{ {
struct intel_context *intel = intel_context(ctx); struct intel_context *intel = intel_context(ctx);
struct intel_buffer_object *intel_obj = intel_buffer_object(obj); struct intel_buffer_object *intel_obj = intel_buffer_object(obj);
@@ -766,7 +764,7 @@ intel_bufferobj_copy_subdata(struct gl_context *ctx,
char *ptr = intel_bufferobj_map(ctx, GL_COPY_WRITE_BUFFER, char *ptr = intel_bufferobj_map(ctx, GL_COPY_WRITE_BUFFER,
GL_READ_WRITE, dst); GL_READ_WRITE, dst);
memmove(ptr + write_offset, ptr + read_offset, size); memmove(ptr + write_offset, ptr + read_offset, size);
intel_bufferobj_unmap(ctx, GL_COPY_WRITE_BUFFER, dst); intel_bufferobj_unmap(ctx, dst);
} else { } else {
const char *src_ptr; const char *src_ptr;
char *dst_ptr; char *dst_ptr;
@@ -778,8 +776,8 @@ intel_bufferobj_copy_subdata(struct gl_context *ctx,
memcpy(dst_ptr + write_offset, src_ptr + read_offset, size); memcpy(dst_ptr + write_offset, src_ptr + read_offset, size);
intel_bufferobj_unmap(ctx, GL_COPY_READ_BUFFER, src); intel_bufferobj_unmap(ctx, src);
intel_bufferobj_unmap(ctx, GL_COPY_WRITE_BUFFER, dst); intel_bufferobj_unmap(ctx, dst);
} }
return; return;
} }

View File

@@ -292,8 +292,7 @@ out:
if (_mesa_is_bufferobj(unpack->BufferObj)) { if (_mesa_is_bufferobj(unpack->BufferObj)) {
/* done with PBO so unmap it now */ /* done with PBO so unmap it now */
ctx->Driver.UnmapBuffer(ctx, GL_PIXEL_UNPACK_BUFFER_EXT, ctx->Driver.UnmapBuffer(ctx, unpack->BufferObj);
unpack->BufferObj);
} }
intel_check_front_buffer_rendering(intel); intel_check_front_buffer_rendering(intel);

View File

@@ -169,7 +169,7 @@ nouveau_bufferobj_map_range(struct gl_context *ctx, GLenum target, GLintptr offs
} }
static GLboolean static GLboolean
nouveau_bufferobj_unmap(struct gl_context *ctx, GLenum target, struct gl_buffer_object *obj) nouveau_bufferobj_unmap(struct gl_context *ctx, struct gl_buffer_object *obj)
{ {
assert(obj->Pointer); assert(obj->Pointer);

View File

@@ -138,7 +138,7 @@ static void r300FixupIndexBuffer(struct gl_context *ctx, const struct _mesa_inde
r300->ind_buf.count = mesa_ind_buf->count; r300->ind_buf.count = mesa_ind_buf->count;
if (mapped_named_bo) { if (mapped_named_bo) {
ctx->Driver.UnmapBuffer(ctx, GL_ELEMENT_ARRAY_BUFFER, mesa_ind_buf->obj); ctx->Driver.UnmapBuffer(ctx, mesa_ind_buf->obj);
} }
} }
@@ -184,7 +184,7 @@ static void r300SetupIndexBuffer(struct gl_context *ctx, const struct _mesa_inde
r300->ind_buf.count = mesa_ind_buf->count; r300->ind_buf.count = mesa_ind_buf->count;
if (mapped_named_bo) { if (mapped_named_bo) {
ctx->Driver.UnmapBuffer(ctx, GL_ELEMENT_ARRAY_BUFFER, mesa_ind_buf->obj); ctx->Driver.UnmapBuffer(ctx, mesa_ind_buf->obj);
} }
} else { } else {
r300FixupIndexBuffer(ctx, mesa_ind_buf); r300FixupIndexBuffer(ctx, mesa_ind_buf);
@@ -286,7 +286,7 @@ static void r300ConvertAttrib(struct gl_context *ctx, int count, const struct gl
radeon_bo_unmap(attr->bo); radeon_bo_unmap(attr->bo);
if (mapped_named_bo) { if (mapped_named_bo) {
ctx->Driver.UnmapBuffer(ctx, GL_ARRAY_BUFFER, input->BufferObj); ctx->Driver.UnmapBuffer(ctx, input->BufferObj);
} }
} }
@@ -321,7 +321,7 @@ static void r300AlignDataToDword(struct gl_context *ctx, const struct gl_client_
} }
if (mapped_named_bo) { if (mapped_named_bo) {
ctx->Driver.UnmapBuffer(ctx, GL_ARRAY_BUFFER, input->BufferObj); ctx->Driver.UnmapBuffer(ctx, input->BufferObj);
} }
radeon_bo_unmap(attr->bo); radeon_bo_unmap(attr->bo);

View File

@@ -456,7 +456,7 @@ static void evergreenConvertAttrib(struct gl_context *ctx, int count,
if (mapped_named_bo) if (mapped_named_bo)
{ {
ctx->Driver.UnmapBuffer(ctx, GL_ARRAY_BUFFER, input->BufferObj); ctx->Driver.UnmapBuffer(ctx, input->BufferObj);
} }
} }
@@ -531,7 +531,7 @@ static void evergreenFixupIndexBuffer(struct gl_context *ctx, const struct _mesa
if (mapped_named_bo) if (mapped_named_bo)
{ {
ctx->Driver.UnmapBuffer(ctx, GL_ELEMENT_ARRAY_BUFFER, mesa_ind_buf->obj); ctx->Driver.UnmapBuffer(ctx, mesa_ind_buf->obj);
} }
} }
@@ -629,7 +629,7 @@ static void evergreenSetupIndexBuffer(struct gl_context *ctx, const struct _mesa
if (mapped_named_bo) if (mapped_named_bo)
{ {
ctx->Driver.UnmapBuffer(ctx, GL_ELEMENT_ARRAY_BUFFER, mesa_ind_buf->obj); ctx->Driver.UnmapBuffer(ctx, mesa_ind_buf->obj);
} }
} }
else else
@@ -675,7 +675,7 @@ static void evergreenAlignDataToDword(struct gl_context *ctx,
radeon_bo_unmap(attr->bo); radeon_bo_unmap(attr->bo);
if (mapped_named_bo) if (mapped_named_bo)
{ {
ctx->Driver.UnmapBuffer(ctx, GL_ARRAY_BUFFER, input->BufferObj); ctx->Driver.UnmapBuffer(ctx, input->BufferObj);
} }
attr->stride = dst_stride; attr->stride = dst_stride;

View File

@@ -543,7 +543,7 @@ static void r700ConvertAttrib(struct gl_context *ctx, int count,
if (mapped_named_bo) if (mapped_named_bo)
{ {
ctx->Driver.UnmapBuffer(ctx, GL_ARRAY_BUFFER, input->BufferObj); ctx->Driver.UnmapBuffer(ctx, input->BufferObj);
} }
} }
@@ -584,7 +584,7 @@ static void r700AlignDataToDword(struct gl_context *ctx,
radeon_bo_unmap(attr->bo); radeon_bo_unmap(attr->bo);
if (mapped_named_bo) if (mapped_named_bo)
{ {
ctx->Driver.UnmapBuffer(ctx, GL_ARRAY_BUFFER, input->BufferObj); ctx->Driver.UnmapBuffer(ctx, input->BufferObj);
} }
attr->stride = dst_stride; attr->stride = dst_stride;
@@ -788,7 +788,7 @@ static void r700FixupIndexBuffer(struct gl_context *ctx, const struct _mesa_inde
if (mapped_named_bo) if (mapped_named_bo)
{ {
ctx->Driver.UnmapBuffer(ctx, GL_ELEMENT_ARRAY_BUFFER, mesa_ind_buf->obj); ctx->Driver.UnmapBuffer(ctx, mesa_ind_buf->obj);
} }
} }
@@ -836,7 +836,7 @@ static void r700SetupIndexBuffer(struct gl_context *ctx, const struct _mesa_inde
if (mapped_named_bo) if (mapped_named_bo)
{ {
ctx->Driver.UnmapBuffer(ctx, GL_ELEMENT_ARRAY_BUFFER, mesa_ind_buf->obj); ctx->Driver.UnmapBuffer(ctx, mesa_ind_buf->obj);
} }
} }
else else

View File

@@ -205,7 +205,6 @@ radeonMapBuffer(struct gl_context * ctx,
*/ */
static GLboolean static GLboolean
radeonUnmapBuffer(struct gl_context * ctx, radeonUnmapBuffer(struct gl_context * ctx,
GLenum target,
struct gl_buffer_object *obj) struct gl_buffer_object *obj)
{ {
struct radeon_buffer_object *radeon_obj = get_radeon_buffer_object(obj); struct radeon_buffer_object *radeon_obj = get_radeon_buffer_object(obj);

View File

@@ -508,8 +508,7 @@ xmesa_DrawPixels_8R8G8B( struct gl_context *ctx,
} }
if (_mesa_is_bufferobj(unpack->BufferObj)) { if (_mesa_is_bufferobj(unpack->BufferObj)) {
ctx->Driver.UnmapBuffer(ctx, GL_PIXEL_UNPACK_BUFFER_EXT, ctx->Driver.UnmapBuffer(ctx, unpack->BufferObj);
unpack->BufferObj);
} }
} }
else { else {
@@ -642,8 +641,7 @@ xmesa_DrawPixels_5R6G5B( struct gl_context *ctx,
} }
if (unpack->BufferObj->Name) { if (unpack->BufferObj->Name) {
ctx->Driver.UnmapBuffer(ctx, GL_PIXEL_UNPACK_BUFFER_EXT, ctx->Driver.UnmapBuffer(ctx, unpack->BufferObj);
unpack->BufferObj);
} }
} }
else { else {

View File

@@ -1622,9 +1622,7 @@ void _ae_unmap_vbos( struct gl_context *ctx )
assert (!actx->NewState); assert (!actx->NewState);
for (i = 0; i < actx->nr_vbos; i++) for (i = 0; i < actx->nr_vbos; i++)
ctx->Driver.UnmapBuffer(ctx, ctx->Driver.UnmapBuffer(ctx, actx->vbo[i]);
GL_ARRAY_BUFFER_ARB,
actx->vbo[i]);
actx->mapped_vbos = GL_FALSE; actx->mapped_vbos = GL_FALSE;
} }

View File

@@ -89,7 +89,7 @@ _mesa_max_buffer_index(struct gl_context *ctx, GLuint count, GLenum type,
} }
if (map) { if (map) {
ctx->Driver.UnmapBuffer(ctx, GL_ELEMENT_ARRAY_BUFFER_ARB, elementBuf); ctx->Driver.UnmapBuffer(ctx, elementBuf);
} }
return max; return max;

View File

@@ -512,11 +512,9 @@ _mesa_buffer_flush_mapped_range( struct gl_context *ctx, GLenum target,
* \sa glUnmapBufferARB, dd_function_table::UnmapBuffer * \sa glUnmapBufferARB, dd_function_table::UnmapBuffer
*/ */
static GLboolean static GLboolean
_mesa_buffer_unmap( struct gl_context *ctx, GLenum target, _mesa_buffer_unmap( struct gl_context *ctx, struct gl_buffer_object *bufObj )
struct gl_buffer_object *bufObj )
{ {
(void) ctx; (void) ctx;
(void) target;
/* XXX we might assert here that bufObj->Pointer is non-null */ /* XXX we might assert here that bufObj->Pointer is non-null */
bufObj->Pointer = NULL; bufObj->Pointer = NULL;
bufObj->Length = 0; bufObj->Length = 0;
@@ -551,8 +549,8 @@ _mesa_copy_buffer_subdata(struct gl_context *ctx,
if (srcPtr && dstPtr) if (srcPtr && dstPtr)
memcpy(dstPtr + writeOffset, srcPtr + readOffset, size); memcpy(dstPtr + writeOffset, srcPtr + readOffset, size);
ctx->Driver.UnmapBuffer(ctx, GL_COPY_READ_BUFFER, src); ctx->Driver.UnmapBuffer(ctx, src);
ctx->Driver.UnmapBuffer(ctx, GL_COPY_WRITE_BUFFER, dst); ctx->Driver.UnmapBuffer(ctx, dst);
} }
@@ -774,7 +772,7 @@ _mesa_DeleteBuffersARB(GLsizei n, const GLuint *ids)
if (_mesa_bufferobj_mapped(bufObj)) { if (_mesa_bufferobj_mapped(bufObj)) {
/* if mapped, unmap it now */ /* if mapped, unmap it now */
ctx->Driver.UnmapBuffer(ctx, 0, bufObj); ctx->Driver.UnmapBuffer(ctx, bufObj);
bufObj->AccessFlags = DEFAULT_ACCESS; bufObj->AccessFlags = DEFAULT_ACCESS;
bufObj->Pointer = NULL; bufObj->Pointer = NULL;
} }
@@ -934,7 +932,7 @@ _mesa_BufferDataARB(GLenum target, GLsizeiptrARB size,
if (_mesa_bufferobj_mapped(bufObj)) { if (_mesa_bufferobj_mapped(bufObj)) {
/* Unmap the existing buffer. We'll replace it now. Not an error. */ /* Unmap the existing buffer. We'll replace it now. Not an error. */
ctx->Driver.UnmapBuffer(ctx, target, bufObj); ctx->Driver.UnmapBuffer(ctx, bufObj);
bufObj->AccessFlags = DEFAULT_ACCESS; bufObj->AccessFlags = DEFAULT_ACCESS;
ASSERT(bufObj->Pointer == NULL); ASSERT(bufObj->Pointer == NULL);
} }
@@ -1147,7 +1145,7 @@ _mesa_UnmapBufferARB(GLenum target)
} }
#endif #endif
status = ctx->Driver.UnmapBuffer( ctx, target, bufObj ); status = ctx->Driver.UnmapBuffer( ctx, bufObj );
bufObj->AccessFlags = DEFAULT_ACCESS; bufObj->AccessFlags = DEFAULT_ACCESS;
ASSERT(bufObj->Pointer == NULL); ASSERT(bufObj->Pointer == NULL);
ASSERT(bufObj->Offset == 0); ASSERT(bufObj->Offset == 0);

View File

@@ -725,7 +725,7 @@ struct dd_function_table {
GLintptr offset, GLsizeiptr length, GLintptr offset, GLsizeiptr length,
struct gl_buffer_object *obj); struct gl_buffer_object *obj);
GLboolean (*UnmapBuffer)( struct gl_context *ctx, GLenum target, GLboolean (*UnmapBuffer)( struct gl_context *ctx,
struct gl_buffer_object *obj ); struct gl_buffer_object *obj );
/*@}*/ /*@}*/

View File

@@ -906,8 +906,7 @@ unpack_image(struct gl_context *ctx, GLuint dimensions,
image = _mesa_unpack_image(dimensions, width, height, depth, image = _mesa_unpack_image(dimensions, width, height, depth,
format, type, src, unpack); format, type, src, unpack);
ctx->Driver.UnmapBuffer(ctx, GL_PIXEL_UNPACK_BUFFER_EXT, ctx->Driver.UnmapBuffer(ctx, unpack->BufferObj);
unpack->BufferObj);
if (!image) { if (!image) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "display list construction"); _mesa_error(ctx, GL_OUT_OF_MEMORY, "display list construction");

View File

@@ -201,8 +201,7 @@ _mesa_unmap_pbo_source(struct gl_context *ctx,
{ {
ASSERT(unpack != &ctx->Pack); /* catch pack/unpack mismatch */ ASSERT(unpack != &ctx->Pack); /* catch pack/unpack mismatch */
if (_mesa_is_bufferobj(unpack->BufferObj)) { if (_mesa_is_bufferobj(unpack->BufferObj)) {
ctx->Driver.UnmapBuffer(ctx, GL_PIXEL_UNPACK_BUFFER_EXT, ctx->Driver.UnmapBuffer(ctx, unpack->BufferObj);
unpack->BufferObj);
} }
} }
@@ -297,7 +296,7 @@ _mesa_unmap_pbo_dest(struct gl_context *ctx,
{ {
ASSERT(pack != &ctx->Unpack); /* catch pack/unpack mismatch */ ASSERT(pack != &ctx->Unpack); /* catch pack/unpack mismatch */
if (_mesa_is_bufferobj(pack->BufferObj)) { if (_mesa_is_bufferobj(pack->BufferObj)) {
ctx->Driver.UnmapBuffer(ctx, GL_PIXEL_PACK_BUFFER_EXT, pack->BufferObj); ctx->Driver.UnmapBuffer(ctx, pack->BufferObj);
} }
} }
@@ -384,8 +383,7 @@ _mesa_unmap_teximage_pbo(struct gl_context *ctx,
const struct gl_pixelstore_attrib *unpack) const struct gl_pixelstore_attrib *unpack)
{ {
if (_mesa_is_bufferobj(unpack->BufferObj)) { if (_mesa_is_bufferobj(unpack->BufferObj)) {
ctx->Driver.UnmapBuffer(ctx, GL_PIXEL_UNPACK_BUFFER_EXT, ctx->Driver.UnmapBuffer(ctx, unpack->BufferObj);
unpack->BufferObj);
} }
} }

View File

@@ -200,7 +200,7 @@ delete_bufferobj_cb(GLuint id, void *data, void *userData)
struct gl_buffer_object *bufObj = (struct gl_buffer_object *) data; struct gl_buffer_object *bufObj = (struct gl_buffer_object *) data;
struct gl_context *ctx = (struct gl_context *) userData; struct gl_context *ctx = (struct gl_context *) userData;
if (_mesa_bufferobj_mapped(bufObj)) { if (_mesa_bufferobj_mapped(bufObj)) {
ctx->Driver.UnmapBuffer(ctx, 0, bufObj); ctx->Driver.UnmapBuffer(ctx, bufObj);
bufObj->Pointer = NULL; bufObj->Pointer = NULL;
} }
_mesa_reference_buffer_object(ctx, &bufObj, NULL); _mesa_reference_buffer_object(ctx, &bufObj, NULL);

View File

@@ -474,8 +474,7 @@ _mesa_get_teximage(struct gl_context *ctx, GLenum target, GLint level,
} }
if (_mesa_is_bufferobj(ctx->Pack.BufferObj)) { if (_mesa_is_bufferobj(ctx->Pack.BufferObj)) {
ctx->Driver.UnmapBuffer(ctx, GL_PIXEL_PACK_BUFFER_EXT, ctx->Driver.UnmapBuffer(ctx, ctx->Pack.BufferObj);
ctx->Pack.BufferObj);
} }
} }
@@ -531,8 +530,7 @@ _mesa_get_compressed_teximage(struct gl_context *ctx, GLenum target, GLint level
} }
if (_mesa_is_bufferobj(ctx->Pack.BufferObj)) { if (_mesa_is_bufferobj(ctx->Pack.BufferObj)) {
ctx->Driver.UnmapBuffer(ctx, GL_PIXEL_PACK_BUFFER_EXT, ctx->Driver.UnmapBuffer(ctx, ctx->Pack.BufferObj);
ctx->Pack.BufferObj);
} }
} }

View File

@@ -378,7 +378,7 @@ st_bufferobj_flush_mapped_range(struct gl_context *ctx, GLenum target,
* Called via glUnmapBufferARB(). * Called via glUnmapBufferARB().
*/ */
static GLboolean static GLboolean
st_bufferobj_unmap(struct gl_context *ctx, GLenum target, struct gl_buffer_object *obj) st_bufferobj_unmap(struct gl_context *ctx, struct gl_buffer_object *obj)
{ {
struct pipe_context *pipe = st_context(ctx)->pipe; struct pipe_context *pipe = st_context(ctx)->pipe;
struct st_buffer_object *st_obj = st_buffer_object(obj); struct st_buffer_object *st_obj = st_buffer_object(obj);

View File

@@ -402,9 +402,7 @@ static void unmap_vbos( struct gl_context *ctx,
{ {
GLuint i; GLuint i;
for (i = 0; i < nr_bo; i++) { for (i = 0; i < nr_bo; i++) {
ctx->Driver.UnmapBuffer(ctx, ctx->Driver.UnmapBuffer(ctx, bo[i]);
0, /* target -- I don't see why this would be needed */
bo[i]);
} }
} }

View File

@@ -947,7 +947,7 @@ void vbo_exec_vtx_destroy( struct vbo_exec_context *exec )
/* Free the vertex buffer. Unmap first if needed. /* Free the vertex buffer. Unmap first if needed.
*/ */
if (_mesa_bufferobj_mapped(exec->vtx.bufferobj)) { if (_mesa_bufferobj_mapped(exec->vtx.bufferobj)) {
ctx->Driver.UnmapBuffer(ctx, GL_ARRAY_BUFFER, exec->vtx.bufferobj); ctx->Driver.UnmapBuffer(ctx, exec->vtx.bufferobj);
} }
_mesa_reference_buffer_object(ctx, &exec->vtx.bufferobj, NULL); _mesa_reference_buffer_object(ctx, &exec->vtx.bufferobj, NULL);
} }

View File

@@ -176,7 +176,7 @@ vbo_get_minmax_index(struct gl_context *ctx,
} }
if (_mesa_is_bufferobj(ib->obj)) { if (_mesa_is_bufferobj(ib->obj)) {
ctx->Driver.UnmapBuffer(ctx, GL_ELEMENT_ARRAY_BUFFER_ARB, ib->obj); ctx->Driver.UnmapBuffer(ctx, ib->obj);
} }
} }
@@ -238,7 +238,7 @@ unmap_array_buffer(struct gl_context *ctx, struct gl_client_array *array)
if (array->Enabled && if (array->Enabled &&
_mesa_is_bufferobj(array->BufferObj) && _mesa_is_bufferobj(array->BufferObj) &&
_mesa_bufferobj_mapped(array->BufferObj)) { _mesa_bufferobj_mapped(array->BufferObj)) {
ctx->Driver.UnmapBuffer(ctx, GL_ARRAY_BUFFER_ARB, array->BufferObj); ctx->Driver.UnmapBuffer(ctx, array->BufferObj);
} }
} }
@@ -296,8 +296,7 @@ check_draw_elements_data(struct gl_context *ctx, GLsizei count, GLenum elemType,
} }
if (_mesa_is_bufferobj(ctx->Array.ElementArrayBufferObj)) { if (_mesa_is_bufferobj(ctx->Array.ElementArrayBufferObj)) {
ctx->Driver.UnmapBuffer(ctx, GL_ELEMENT_ARRAY_BUFFER_ARB, ctx->Driver.UnmapBuffer(ctx, ctx->Array.ElementArrayBufferObj);
ctx->Array.ElementArrayBufferObj);
} }
unmap_array_buffer(ctx, &arrayObj->Vertex); unmap_array_buffer(ctx, &arrayObj->Vertex);
@@ -364,7 +363,7 @@ print_draw_arrays(struct gl_context *ctx,
for (i = 0; i < n; i++) { for (i = 0; i < n; i++) {
printf(" float[%d] = 0x%08x %f\n", i, k[i], f[i]); printf(" float[%d] = 0x%08x %f\n", i, k[i], f[i]);
} }
ctx->Driver.UnmapBuffer(ctx, GL_ARRAY_BUFFER_ARB, bufObj); ctx->Driver.UnmapBuffer(ctx, bufObj);
} }
} }
} }
@@ -760,8 +759,7 @@ dump_element_buffer(struct gl_context *ctx, GLenum type)
; ;
} }
ctx->Driver.UnmapBuffer(ctx, GL_ELEMENT_ARRAY_BUFFER_ARB, ctx->Driver.UnmapBuffer(ctx, ctx->Array.ElementArrayBufferObj);
ctx->Array.ElementArrayBufferObj);
} }

View File

@@ -281,7 +281,7 @@ vbo_exec_vtx_unmap( struct vbo_exec_context *exec )
assert(exec->vtx.buffer_used <= VBO_VERT_BUFFER_SIZE); assert(exec->vtx.buffer_used <= VBO_VERT_BUFFER_SIZE);
assert(exec->vtx.buffer_ptr != NULL); assert(exec->vtx.buffer_ptr != NULL);
ctx->Driver.UnmapBuffer(ctx, target, exec->vtx.bufferobj); ctx->Driver.UnmapBuffer(ctx, exec->vtx.bufferobj);
exec->vtx.buffer_map = NULL; exec->vtx.buffer_map = NULL;
exec->vtx.buffer_ptr = NULL; exec->vtx.buffer_ptr = NULL;
exec->vtx.max_vert = 0; exec->vtx.max_vert = 0;

View File

@@ -183,9 +183,7 @@ void vbo_rebase_prims( struct gl_context *ctx,
} }
if (map_ib) if (map_ib)
ctx->Driver.UnmapBuffer(ctx, ctx->Driver.UnmapBuffer(ctx, ib->obj);
GL_ELEMENT_ARRAY_BUFFER,
ib->obj);
tmp_ib.obj = ctx->Shared->NullBufferObj; tmp_ib.obj = ctx->Shared->NullBufferObj;
tmp_ib.ptr = tmp_indices; tmp_ib.ptr = tmp_indices;

View File

@@ -247,7 +247,7 @@ static void
unmap_vertex_store(struct gl_context *ctx, unmap_vertex_store(struct gl_context *ctx,
struct vbo_save_vertex_store *vertex_store) struct vbo_save_vertex_store *vertex_store)
{ {
ctx->Driver.UnmapBuffer(ctx, GL_ARRAY_BUFFER_ARB, vertex_store->bufferobj); ctx->Driver.UnmapBuffer(ctx, vertex_store->bufferobj);
vertex_store->buffer = NULL; vertex_store->buffer = NULL;
} }

View File

@@ -230,8 +230,7 @@ vbo_save_loopback_vertex_list(struct gl_context *ctx,
list->wrap_count, list->wrap_count,
list->vertex_size); list->vertex_size);
ctx->Driver.UnmapBuffer(ctx, GL_ARRAY_BUFFER_ARB, ctx->Driver.UnmapBuffer(ctx, list->vertex_store->bufferobj);
list->vertex_store->bufferobj);
} }

View File

@@ -564,14 +564,14 @@ replay_finish( struct copy_context *copy )
for (i = 0; i < copy->nr_varying; i++) { for (i = 0; i < copy->nr_varying; i++) {
struct gl_buffer_object *vbo = copy->varying[i].array->BufferObj; struct gl_buffer_object *vbo = copy->varying[i].array->BufferObj;
if (_mesa_is_bufferobj(vbo) && _mesa_bufferobj_mapped(vbo)) if (_mesa_is_bufferobj(vbo) && _mesa_bufferobj_mapped(vbo))
ctx->Driver.UnmapBuffer(ctx, GL_ARRAY_BUFFER, vbo); ctx->Driver.UnmapBuffer(ctx, vbo);
} }
/* Unmap index buffer: /* Unmap index buffer:
*/ */
if (_mesa_is_bufferobj(copy->ib->obj) && if (_mesa_is_bufferobj(copy->ib->obj) &&
_mesa_bufferobj_mapped(copy->ib->obj)) { _mesa_bufferobj_mapped(copy->ib->obj)) {
ctx->Driver.UnmapBuffer(ctx, GL_ELEMENT_ARRAY_BUFFER, copy->ib->obj); ctx->Driver.UnmapBuffer(ctx, copy->ib->obj);
} }
} }