[Mesa-dev] [PATCH 18/18] mesa: Remove unused arguments from driver->DepthRange

Courtney Goeltzenleuchter courtney at lunarg.com
Wed Nov 20 14:59:34 PST 2013


Signed-off-by: Courtney Goeltzenleuchter <courtney at LunarG.com>
---
 src/mesa/drivers/dri/i915/i830_state.c      | 2 +-
 src/mesa/drivers/dri/i915/i830_vtbl.c       | 2 +-
 src/mesa/drivers/dri/i915/i915_state.c      | 2 +-
 src/mesa/drivers/dri/i915/i915_vtbl.c       | 2 +-
 src/mesa/drivers/dri/r200/r200_state.c      | 3 +--
 src/mesa/drivers/dri/radeon/radeon_common.c | 4 +---
 src/mesa/drivers/dri/radeon/radeon_state.c  | 3 +--
 src/mesa/main/dd.h                          | 3 +--
 src/mesa/main/viewport.c                    | 2 +-
 9 files changed, 9 insertions(+), 14 deletions(-)

diff --git a/src/mesa/drivers/dri/i915/i830_state.c b/src/mesa/drivers/dri/i915/i830_state.c
index b4298ad..3435359 100644
--- a/src/mesa/drivers/dri/i915/i830_state.c
+++ b/src/mesa/drivers/dri/i915/i830_state.c
@@ -453,7 +453,7 @@ i830DepthMask(struct gl_context * ctx, GLboolean flag)
 
 /** Called from ctx->Driver.DepthRange() */
 static void
-i830DepthRange(struct gl_context * ctx, GLuint idx, GLclampd nearval, GLclampd farval)
+i830DepthRange(struct gl_context * ctx, GLuint idx)
 {
    intelCalcViewport(ctx);
 }
diff --git a/src/mesa/drivers/dri/i915/i830_vtbl.c b/src/mesa/drivers/dri/i915/i830_vtbl.c
index 0a90fc0..a8e67c2 100644
--- a/src/mesa/drivers/dri/i915/i830_vtbl.c
+++ b/src/mesa/drivers/dri/i915/i830_vtbl.c
@@ -839,7 +839,7 @@ i830_update_draw_buffer(struct intel_context *intel)
     */
    ctx->Driver.Scissor(ctx, 0);
 
-   ctx->Driver.DepthRange(ctx, 0, ctx->ViewportArray[0].Near, ctx->ViewportArray[0].Far);
+   ctx->Driver.DepthRange(ctx, 0);
 
    /* Update culling direction which changes depending on the
     * orientation of the buffer:
diff --git a/src/mesa/drivers/dri/i915/i915_state.c b/src/mesa/drivers/dri/i915/i915_state.c
index 8ae7202..47c01a0 100644
--- a/src/mesa/drivers/dri/i915/i915_state.c
+++ b/src/mesa/drivers/dri/i915/i915_state.c
@@ -426,7 +426,7 @@ intelCalcViewport(struct gl_context * ctx)
 
 /** Called from ctx->Driver.DepthRange() */
 static void
-i915DepthRange(struct gl_context * ctx, GLuint idx, GLclampd nearval, GLclampd farval)
+i915DepthRange(struct gl_context * ctx, GLuint idx)
 {
    intelCalcViewport(ctx);
 }
diff --git a/src/mesa/drivers/dri/i915/i915_vtbl.c b/src/mesa/drivers/dri/i915/i915_vtbl.c
index 80a0ff3..778e523 100644
--- a/src/mesa/drivers/dri/i915/i915_vtbl.c
+++ b/src/mesa/drivers/dri/i915/i915_vtbl.c
@@ -811,7 +811,7 @@ i915_update_draw_buffer(struct intel_context *intel)
 
    /* Set state we know depends on drawable parameters:
     */
-   ctx->Driver.DepthRange(ctx, 0, ctx->ViewportArray[0].Near, ctx->ViewportArray[0].Far);
+   ctx->Driver.DepthRange(ctx, 0);
    ctx->Driver.Scissor(ctx, 0);
 
    /* Update culling direction which changes depending on the
diff --git a/src/mesa/drivers/dri/r200/r200_state.c b/src/mesa/drivers/dri/r200/r200_state.c
index a9c9f9f..bda8d89 100644
--- a/src/mesa/drivers/dri/r200/r200_state.c
+++ b/src/mesa/drivers/dri/r200/r200_state.c
@@ -1611,8 +1611,7 @@ static void r200Viewport( struct gl_context *ctx, GLuint idx)
    radeon_viewport(ctx);
 }
 
-static void r200DepthRange( struct gl_context *ctx, GLuint idx,
-                            GLclampd nearval, GLclampd farval )
+static void r200DepthRange( struct gl_context *ctx, GLuint idx)
 {
    r200UpdateWindow( ctx );
 }
diff --git a/src/mesa/drivers/dri/radeon/radeon_common.c b/src/mesa/drivers/dri/radeon/radeon_common.c
index d7121c4..eeedae5 100644
--- a/src/mesa/drivers/dri/radeon/radeon_common.c
+++ b/src/mesa/drivers/dri/radeon/radeon_common.c
@@ -333,9 +333,7 @@ void radeon_draw_buffer(struct gl_context *ctx, struct gl_framebuffer *fb)
 	radeon->NewGLState |= _NEW_SCISSOR;
 
 	if (ctx->Driver.DepthRange)
-		ctx->Driver.DepthRange(ctx, 0,
-				       ctx->ViewportArray[0].Near,
-				       ctx->ViewportArray[0].Far);
+		ctx->Driver.DepthRange(ctx, 0);
 
 	/* Update culling direction which changes depending on the
 	 * orientation of the buffer:
diff --git a/src/mesa/drivers/dri/radeon/radeon_state.c b/src/mesa/drivers/dri/radeon/radeon_state.c
index 52ddbfd..534ec46 100644
--- a/src/mesa/drivers/dri/radeon/radeon_state.c
+++ b/src/mesa/drivers/dri/radeon/radeon_state.c
@@ -1395,8 +1395,7 @@ static void radeonViewport( struct gl_context *ctx, GLuint idx)
    radeon_viewport(ctx);
 }
 
-static void radeonDepthRange( struct gl_context *ctx, GLuint idx,
-                             GLclampd nearval, GLclampd farval )
+static void radeonDepthRange( struct gl_context *ctx, GLuint idx)
 {
    radeonUpdateWindow( ctx );
 }
diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
index c61fe12..c8618b5 100644
--- a/src/mesa/main/dd.h
+++ b/src/mesa/main/dd.h
@@ -479,8 +479,7 @@ struct dd_function_table {
    /** Enable or disable writing into the depth buffer */
    void (*DepthMask)(struct gl_context *ctx, GLboolean flag);
    /** Specify mapping of depth values from NDC to window coordinates */
-   void (*DepthRange)(struct gl_context *ctx, GLuint idx,
-                      GLclampd nearval, GLclampd farval);
+   void (*DepthRange)(struct gl_context *ctx, GLuint idx);
    /** Specify the current buffer for writing */
    void (*DrawBuffer)( struct gl_context *ctx, GLenum buffer );
    /** Specify the buffers for writing for fragment programs*/
diff --git a/src/mesa/main/viewport.c b/src/mesa/main/viewport.c
index ce1dd2f..a85a528 100644
--- a/src/mesa/main/viewport.c
+++ b/src/mesa/main/viewport.c
@@ -256,7 +256,7 @@ _mesa_set_depthrangei(struct gl_context *ctx, GLuint index,
 #endif
 
    if (ctx->Driver.DepthRange) {
-      ctx->Driver.DepthRange(ctx, index, nearval, farval);
+      ctx->Driver.DepthRange(ctx, index);
    }
 }
 
-- 
1.8.1.2



More information about the mesa-dev mailing list