From: Ian Romanick Date: Mon, 22 Aug 2011 00:56:39 +0000 (-0700) Subject: mesa: Remove target parameter from dd_function_table::FlushMappedBufferRange X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6183edc070e2d3dce36ab5ee7aee72b0c38775a7;p=mesa.git mesa: Remove target parameter from dd_function_table::FlushMappedBufferRange 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 --- diff --git a/src/mesa/drivers/dri/intel/intel_buffer_objects.c b/src/mesa/drivers/dri/intel/intel_buffer_objects.c index 16a56b03a2e..1a0f5486c4f 100644 --- a/src/mesa/drivers/dri/intel/intel_buffer_objects.c +++ b/src/mesa/drivers/dri/intel/intel_buffer_objects.c @@ -471,7 +471,7 @@ intel_bufferobj_map_range(struct gl_context * ctx, * would defeat the point. */ static void -intel_bufferobj_flush_mapped_range(struct gl_context *ctx, GLenum target, +intel_bufferobj_flush_mapped_range(struct gl_context *ctx, GLintptr offset, GLsizeiptr length, struct gl_buffer_object *obj) { diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index ba3811d315b..47af8b59587 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/mesa/main/bufferobj.c @@ -488,12 +488,11 @@ _mesa_buffer_map_range( struct gl_context *ctx, GLintptr offset, * Called via glFlushMappedBufferRange(). */ static void -_mesa_buffer_flush_mapped_range( struct gl_context *ctx, GLenum target, +_mesa_buffer_flush_mapped_range( struct gl_context *ctx, GLintptr offset, GLsizeiptr length, struct gl_buffer_object *obj ) { (void) ctx; - (void) target; (void) offset; (void) length; (void) obj; @@ -1527,7 +1526,7 @@ _mesa_FlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeiptr length) ASSERT(bufObj->AccessFlags & GL_MAP_WRITE_BIT); if (ctx->Driver.FlushMappedBufferRange) - ctx->Driver.FlushMappedBufferRange(ctx, target, offset, length, bufObj); + ctx->Driver.FlushMappedBufferRange(ctx, offset, length, bufObj); } diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h index 9876d5a53e0..8dfea937f37 100644 --- a/src/mesa/main/dd.h +++ b/src/mesa/main/dd.h @@ -721,7 +721,7 @@ struct dd_function_table { GLsizeiptr length, GLbitfield access, struct gl_buffer_object *obj); - void (*FlushMappedBufferRange)(struct gl_context *ctx, GLenum target, + void (*FlushMappedBufferRange)(struct gl_context *ctx, GLintptr offset, GLsizeiptr length, 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 6857c00b08d..dd2eca7bc96 100644 --- a/src/mesa/state_tracker/st_cb_bufferobjects.c +++ b/src/mesa/state_tracker/st_cb_bufferobjects.c @@ -351,7 +351,7 @@ st_bufferobj_map_range(struct gl_context *ctx, static void -st_bufferobj_flush_mapped_range(struct gl_context *ctx, GLenum target, +st_bufferobj_flush_mapped_range(struct gl_context *ctx, GLintptr offset, GLsizeiptr length, struct gl_buffer_object *obj) { diff --git a/src/mesa/vbo/vbo_exec_draw.c b/src/mesa/vbo/vbo_exec_draw.c index 2c8340ca5ca..2dc60661796 100644 --- a/src/mesa/vbo/vbo_exec_draw.c +++ b/src/mesa/vbo/vbo_exec_draw.c @@ -270,8 +270,7 @@ vbo_exec_vtx_unmap( struct vbo_exec_context *exec ) GLsizeiptr length = (exec->vtx.buffer_ptr - exec->vtx.buffer_map) * sizeof(float); if (length) - ctx->Driver.FlushMappedBufferRange(ctx, target, - offset, length, + ctx->Driver.FlushMappedBufferRange(ctx, offset, length, exec->vtx.bufferobj); }