From 4ddae2fb666c86e3267ef6e3d2699f9bfb40d206 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Sun, 21 Aug 2011 17:37:56 -0700 Subject: mesa: Remove target parameter from dd_function_table::MapBufferRange 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 Reviewed-by: Brian Paul Acked-by: Kenneth Graunke Reviewed-by: Eric Anholt --- src/mesa/main/bufferobj.c | 6 ++---- src/mesa/main/dd.h | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'src/mesa/main') diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index 41e83b0d689..ba3811d315b 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/mesa/main/bufferobj.c @@ -468,12 +468,11 @@ _mesa_buffer_map( struct gl_context *ctx, GLenum access, * Called via glMapBufferRange(). */ static void * -_mesa_buffer_map_range( struct gl_context *ctx, GLenum target, GLintptr offset, +_mesa_buffer_map_range( struct gl_context *ctx, GLintptr offset, GLsizeiptr length, GLbitfield access, struct gl_buffer_object *bufObj ) { (void) ctx; - (void) target; assert(!_mesa_bufferobj_mapped(bufObj)); /* Just return a direct pointer to the data */ bufObj->Pointer = bufObj->Data + offset; @@ -1445,8 +1444,7 @@ _mesa_MapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length, } ASSERT(ctx->Driver.MapBufferRange); - map = ctx->Driver.MapBufferRange(ctx, target, offset, length, - access, bufObj); + map = ctx->Driver.MapBufferRange(ctx, offset, length, access, bufObj); if (!map) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glMapBufferARB(map failed)"); } diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h index 5560d96931a..9876d5a53e0 100644 --- a/src/mesa/main/dd.h +++ b/src/mesa/main/dd.h @@ -717,7 +717,7 @@ struct dd_function_table { /* May return NULL if MESA_MAP_NOWAIT_BIT is set in access: */ - void * (*MapBufferRange)( struct gl_context *ctx, GLenum target, GLintptr offset, + void * (*MapBufferRange)( struct gl_context *ctx, GLintptr offset, GLsizeiptr length, GLbitfield access, struct gl_buffer_object *obj); -- cgit v1.2.3