Mesa (master): mesa: Remove target parameter from dd_function_table:: MapBufferRange

Ian Romanick idr at kemper.freedesktop.org
Tue Aug 23 14:52:58 PDT 2011


Module: Mesa
Branch: master
Commit: 4ddae2fb666c86e3267ef6e3d2699f9bfb40d206
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=4ddae2fb666c86e3267ef6e3d2699f9bfb40d206

Author: Ian Romanick <ian.d.romanick at intel.com>
Date:   Sun Aug 21 17:37:56 2011 -0700

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 <ian.d.romanick at intel.com>
Reviewed-by: Brian Paul <brianp at vmware.com>
Acked-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Eric Anholt <eric at anholt.net>

---

 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 41e83b0..ba3811d 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 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);



More information about the mesa-commit mailing list