diff options
author | Ian Romanick <[email protected]> | 2011-08-21 17:37:56 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2011-08-23 14:52:10 -0700 |
commit | 4ddae2fb666c86e3267ef6e3d2699f9bfb40d206 (patch) | |
tree | 6ca66a7a163a0646f5eea1e22881141c16836b6d | |
parent | 6c8aa3491a19535e8c39a47a3766bf8524e80582 (diff) |
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 <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Acked-by: Kenneth Graunke <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_buffer_objects.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/nouveau/nouveau_bufferobj.c | 3 | ||||
-rw-r--r-- | src/mesa/main/bufferobj.c | 6 | ||||
-rw-r--r-- | src/mesa/main/dd.h | 2 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_cb_bufferobjects.c | 2 | ||||
-rw-r--r-- | src/mesa/vbo/vbo_exec_draw.c | 3 |
6 files changed, 7 insertions, 11 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_buffer_objects.c b/src/mesa/drivers/dri/intel/intel_buffer_objects.c index d9c70dec85b..7a0102b7226 100644 --- a/src/mesa/drivers/dri/intel/intel_buffer_objects.c +++ b/src/mesa/drivers/dri/intel/intel_buffer_objects.c @@ -369,7 +369,7 @@ intel_bufferobj_map(struct gl_context * ctx, */ static void * intel_bufferobj_map_range(struct gl_context * ctx, - GLenum target, GLintptr offset, GLsizeiptr length, + GLintptr offset, GLsizeiptr length, GLbitfield access, struct gl_buffer_object *obj) { struct intel_context *intel = intel_context(ctx); diff --git a/src/mesa/drivers/dri/nouveau/nouveau_bufferobj.c b/src/mesa/drivers/dri/nouveau/nouveau_bufferobj.c index 87a2bfee093..cf892a893f8 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_bufferobj.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_bufferobj.c @@ -135,8 +135,7 @@ nouveau_bufferobj_map(struct gl_context *ctx, GLenum access, access == GL_READ_WRITE_ARB) flags |= GL_MAP_WRITE_BIT; - return ctx->Driver.MapBufferRange(ctx, 0, 0, obj->Size, flags, - obj); + return ctx->Driver.MapBufferRange(ctx, 0, obj->Size, flags, obj); } static void * 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); diff --git a/src/mesa/state_tracker/st_cb_bufferobjects.c b/src/mesa/state_tracker/st_cb_bufferobjects.c index 2de56bdb54b..6857c00b08d 100644 --- a/src/mesa/state_tracker/st_cb_bufferobjects.c +++ b/src/mesa/state_tracker/st_cb_bufferobjects.c @@ -281,7 +281,7 @@ st_bufferobj_map(struct gl_context *ctx, GLenum access, * Called via glMapBufferRange(). */ static void * -st_bufferobj_map_range(struct gl_context *ctx, GLenum target, +st_bufferobj_map_range(struct gl_context *ctx, GLintptr offset, GLsizeiptr length, GLbitfield access, struct gl_buffer_object *obj) { diff --git a/src/mesa/vbo/vbo_exec_draw.c b/src/mesa/vbo/vbo_exec_draw.c index 07c5c969453..2c8340ca5ca 100644 --- a/src/mesa/vbo/vbo_exec_draw.c +++ b/src/mesa/vbo/vbo_exec_draw.c @@ -316,7 +316,6 @@ vbo_exec_vtx_map( struct vbo_exec_context *exec ) /* The VBO exists and there's room for more */ exec->vtx.buffer_map = (GLfloat *)ctx->Driver.MapBufferRange(ctx, - target, exec->vtx.buffer_used, (VBO_VERT_BUFFER_SIZE - exec->vtx.buffer_used), @@ -336,7 +335,7 @@ vbo_exec_vtx_map( struct vbo_exec_context *exec ) if (ctx->Driver.MapBufferRange) exec->vtx.buffer_map = - (GLfloat *)ctx->Driver.MapBufferRange(ctx, target, + (GLfloat *)ctx->Driver.MapBufferRange(ctx, 0, VBO_VERT_BUFFER_SIZE, accessRange, exec->vtx.bufferobj); |