[Mesa-dev] [PATCH 05/12] mesa: Remove target parameter from dd_function_table::MapBufferRange
Ian Romanick
idr at freedesktop.org
Mon Aug 22 00:32:57 PDT 2011
From: Ian Romanick <ian.d.romanick at intel.com>
No driver used that parameter, and most drivers ended up with a bunch
of unused-parameter warnings because it was there.
---
src/mesa/drivers/dri/intel/intel_buffer_objects.c | 2 +-
src/mesa/drivers/dri/nouveau/nouveau_bufferobj.c | 3 +--
src/mesa/main/bufferobj.c | 6 ++----
src/mesa/main/dd.h | 2 +-
src/mesa/state_tracker/st_cb_bufferobjects.c | 2 +-
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 d9c70de..7a0102b 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 87a2bfe..cf892a8 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 97f2ced..980bb23 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;
@@ -1447,8 +1446,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 5560d96..9876d5a 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 2de56bd..6857c00 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 07c5c96..2c8340c 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);
--
1.7.4.4
More information about the mesa-dev
mailing list