[Mesa-dev] [PATCH 03/18] mesa: Change DepthRange dd interface
Courtney Goeltzenleuchter
courtney at lunarg.com
Wed Nov 20 14:59:18 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 | 4 ++--
src/mesa/drivers/dri/radeon/radeon_common.c | 2 +-
src/mesa/drivers/dri/radeon/radeon_state.c | 4 ++--
src/mesa/main/dd.h | 3 ++-
src/mesa/main/viewport.c | 2 +-
9 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/src/mesa/drivers/dri/i915/i830_state.c b/src/mesa/drivers/dri/i915/i830_state.c
index e140e04..090e4a0 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, GLclampd nearval, GLclampd farval)
+i830DepthRange(struct gl_context * ctx, GLuint idx, GLclampd nearval, GLclampd farval)
{
intelCalcViewport(ctx);
}
diff --git a/src/mesa/drivers/dri/i915/i830_vtbl.c b/src/mesa/drivers/dri/i915/i830_vtbl.c
index cea6930..33ca002 100644
--- a/src/mesa/drivers/dri/i915/i830_vtbl.c
+++ b/src/mesa/drivers/dri/i915/i830_vtbl.c
@@ -840,7 +840,7 @@ i830_update_draw_buffer(struct intel_context *intel)
ctx->Driver.Scissor(ctx, 0, ctx->Scissor.X, ctx->Scissor.Y,
ctx->Scissor.Width, ctx->Scissor.Height);
- ctx->Driver.DepthRange(ctx, ctx->Viewport.Near, ctx->Viewport.Far);
+ ctx->Driver.DepthRange(ctx, 0, ctx->Viewport.Near, ctx->Viewport.Far);
/* 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 ca26bdc..ee7d4ae 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, GLclampd nearval, GLclampd farval)
+i915DepthRange(struct gl_context * ctx, GLuint idx, GLclampd nearval, GLclampd farval)
{
intelCalcViewport(ctx);
}
diff --git a/src/mesa/drivers/dri/i915/i915_vtbl.c b/src/mesa/drivers/dri/i915/i915_vtbl.c
index f7656f9..10a2865 100644
--- a/src/mesa/drivers/dri/i915/i915_vtbl.c
+++ b/src/mesa/drivers/dri/i915/i915_vtbl.c
@@ -813,7 +813,7 @@ i915_update_draw_buffer(struct intel_context *intel)
*/
ctx->Driver.Scissor(ctx, 0, ctx->Scissor.X, ctx->Scissor.Y,
ctx->Scissor.Width, ctx->Scissor.Height);
- ctx->Driver.DepthRange(ctx, ctx->Viewport.Near, ctx->Viewport.Far);
+ ctx->Driver.DepthRange(ctx, 0, ctx->Viewport.Near, ctx->Viewport.Far);
/* Update culling direction which changes depending on the
* orientation of the buffer:
diff --git a/src/mesa/drivers/dri/r200/r200_state.c b/src/mesa/drivers/dri/r200/r200_state.c
index 515499e..219fc49 100644
--- a/src/mesa/drivers/dri/r200/r200_state.c
+++ b/src/mesa/drivers/dri/r200/r200_state.c
@@ -1617,8 +1617,8 @@ static void r200Viewport( struct gl_context *ctx, GLuint idx, GLint x, GLint y,
radeon_viewport(ctx);
}
-static void r200DepthRange( struct gl_context *ctx, GLclampd nearval,
- GLclampd farval )
+static void r200DepthRange( struct gl_context *ctx, GLuint idx,
+ GLclampd nearval, GLclampd farval )
{
r200UpdateWindow( ctx );
}
diff --git a/src/mesa/drivers/dri/radeon/radeon_common.c b/src/mesa/drivers/dri/radeon/radeon_common.c
index 671c15f..b3c8393 100644
--- a/src/mesa/drivers/dri/radeon/radeon_common.c
+++ b/src/mesa/drivers/dri/radeon/radeon_common.c
@@ -333,7 +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,
+ ctx->Driver.DepthRange(ctx, 0,
ctx->Viewport.Near,
ctx->Viewport.Far);
diff --git a/src/mesa/drivers/dri/radeon/radeon_state.c b/src/mesa/drivers/dri/radeon/radeon_state.c
index 48bbbd8..b62a51a 100644
--- a/src/mesa/drivers/dri/radeon/radeon_state.c
+++ b/src/mesa/drivers/dri/radeon/radeon_state.c
@@ -1400,8 +1400,8 @@ static void radeonViewport( struct gl_context *ctx, GLuint idx, GLint x, GLint y
radeon_viewport(ctx);
}
-static void radeonDepthRange( struct gl_context *ctx, GLclampd nearval,
- GLclampd farval )
+static void radeonDepthRange( struct gl_context *ctx, GLuint idx,
+ GLclampd nearval, GLclampd farval )
{
radeonUpdateWindow( ctx );
}
diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
index ed4ad6f..d777cc8 100644
--- a/src/mesa/main/dd.h
+++ b/src/mesa/main/dd.h
@@ -479,7 +479,8 @@ 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, GLclampd nearval, GLclampd farval);
+ void (*DepthRange)(struct gl_context *ctx, GLuint idx,
+ GLclampd nearval, GLclampd farval);
/** 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 8540e52..5da10ba 100644
--- a/src/mesa/main/viewport.c
+++ b/src/mesa/main/viewport.c
@@ -143,7 +143,7 @@ _mesa_DepthRange(GLclampd nearval, GLclampd farval)
#endif
if (ctx->Driver.DepthRange) {
- ctx->Driver.DepthRange(ctx, nearval, farval);
+ ctx->Driver.DepthRange(ctx, 0, nearval, farval);
}
}
--
1.8.1.2
More information about the mesa-dev
mailing list