diff options
Diffstat (limited to 'src/mesa/main/bufferobj.c')
-rw-r--r-- | src/mesa/main/bufferobj.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index e52e59eb5c2..fc1ca2a3680 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/mesa/main/bufferobj.c @@ -447,11 +447,10 @@ _mesa_buffer_get_subdata( struct gl_context *ctx, * \sa glMapBufferARB, dd_function_table::MapBuffer */ static void * -_mesa_buffer_map( struct gl_context *ctx, GLenum target, GLenum access, +_mesa_buffer_map( struct gl_context *ctx, GLenum access, struct gl_buffer_object *bufObj ) { (void) ctx; - (void) target; (void) access; /* Just return a direct pointer to the data */ if (_mesa_bufferobj_mapped(bufObj)) { @@ -541,10 +540,8 @@ _mesa_copy_buffer_subdata(struct gl_context *ctx, assert(!_mesa_bufferobj_mapped(src)); assert(!_mesa_bufferobj_mapped(dst)); - srcPtr = (GLubyte *) ctx->Driver.MapBuffer(ctx, GL_COPY_READ_BUFFER, - GL_READ_ONLY, src); - dstPtr = (GLubyte *) ctx->Driver.MapBuffer(ctx, GL_COPY_WRITE_BUFFER, - GL_WRITE_ONLY, dst); + srcPtr = (GLubyte *) ctx->Driver.MapBuffer(ctx, GL_READ_ONLY, src); + dstPtr = (GLubyte *) ctx->Driver.MapBuffer(ctx, GL_WRITE_ONLY, dst); if (srcPtr && dstPtr) memcpy(dstPtr + writeOffset, srcPtr + readOffset, size); @@ -1042,7 +1039,7 @@ _mesa_MapBufferARB(GLenum target, GLenum access) } ASSERT(ctx->Driver.MapBuffer); - map = ctx->Driver.MapBuffer( ctx, target, access, bufObj ); + map = ctx->Driver.MapBuffer( ctx, access, bufObj ); if (!map) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glMapBufferARB(map failed)"); return NULL; |