[Mesa-dev] [PATCH 16/18] mesa: Remove unused arguments from driver->Scissor
Courtney Goeltzenleuchter
courtney at lunarg.com
Wed Nov 20 14:59:32 PST 2013
Signed-off-by: Courtney Goeltzenleuchter <courtney at LunarG.com>
---
src/mesa/drivers/common/driverfuncs.c | 4 +---
src/mesa/drivers/dri/i915/i830_state.c | 24 ++++++++++++++----------
src/mesa/drivers/dri/i915/i830_vtbl.c | 3 +--
src/mesa/drivers/dri/i915/i915_state.c | 24 ++++++++++++++----------
src/mesa/drivers/dri/i915/i915_vtbl.c | 3 +--
src/mesa/drivers/dri/radeon/radeon_common.c | 2 +-
src/mesa/drivers/dri/radeon/radeon_common.h | 2 +-
src/mesa/main/dd.h | 4 +---
src/mesa/main/scissor.c | 4 +---
9 files changed, 35 insertions(+), 35 deletions(-)
diff --git a/src/mesa/drivers/common/driverfuncs.c b/src/mesa/drivers/common/driverfuncs.c
index f232766..ba923b2 100644
--- a/src/mesa/drivers/common/driverfuncs.c
+++ b/src/mesa/drivers/common/driverfuncs.c
@@ -298,9 +298,7 @@ _mesa_init_driver_state(struct gl_context *ctx)
{
GLint i;
for (i = 0; i < ctx->Const.MaxViewports; i++) {
- ctx->Driver.Scissor(ctx, i,
- ctx->Scissor.ScissorArray[i].X, ctx->Scissor.ScissorArray[i].Y,
- ctx->Scissor.ScissorArray[i].Width, ctx->Scissor.ScissorArray[i].Height);
+ ctx->Driver.Scissor(ctx, i);
}
}
diff --git a/src/mesa/drivers/dri/i915/i830_state.c b/src/mesa/drivers/dri/i915/i830_state.c
index 090e4a0..b4298ad 100644
--- a/src/mesa/drivers/dri/i915/i830_state.c
+++ b/src/mesa/drivers/dri/i915/i830_state.c
@@ -527,7 +527,7 @@ i830PolygonStipple(struct gl_context * ctx, const GLubyte * mask)
* Hardware clipping
*/
static void
-i830Scissor(struct gl_context * ctx, GLuint idx, GLint x, GLint y, GLsizei w, GLsizei h)
+i830Scissor(struct gl_context * ctx, GLuint idx)
{
struct i830_context *i830 = i830_context(ctx);
int x1, y1, x2, y2;
@@ -535,22 +535,26 @@ i830Scissor(struct gl_context * ctx, GLuint idx, GLint x, GLint y, GLsizei w, GL
if (!ctx->DrawBuffer)
return;
- DBG("%s %d,%d %dx%d\n", __FUNCTION__, x, y, w, h);
+ DBG("%s idx=%d %d,%d %dx%d\n", __FUNCTION__, idx,
+ ctx->Scissor.ScissorArray[idx].X,
+ ctx->Scissor.ScissorArray[idx].Y,
+ ctx->Scissor.ScissorArray[idx].Width,
+ ctx->Scissor.ScissorArray[idx].Height);
if (_mesa_is_winsys_fbo(ctx->DrawBuffer)) {
- x1 = x;
- y1 = ctx->DrawBuffer->Height - (y + h);
- x2 = x + w - 1;
- y2 = y1 + h - 1;
+ x1 = ctx->Scissor.ScissorArray[idx].X;
+ y1 = ctx->DrawBuffer->Height - (ctx->Scissor.ScissorArray[idx].Y + ctx->Scissor.ScissorArray[idx].Height);
+ x2 = ctx->Scissor.ScissorArray[idx].X + ctx->Scissor.ScissorArray[idx].Width - 1;
+ y2 = y1 + ctx->Scissor.ScissorArray[idx].Height - 1;
DBG("%s %d..%d,%d..%d (inverted)\n", __FUNCTION__, x1, x2, y1, y2);
}
else {
/* FBO - not inverted
*/
- x1 = x;
- y1 = y;
- x2 = x + w - 1;
- y2 = y + h - 1;
+ x1 = ctx->Scissor.ScissorArray[idx].X;
+ y1 = ctx->Scissor.ScissorArray[idx].Y;
+ x2 = ctx->Scissor.ScissorArray[idx].X + ctx->Scissor.ScissorArray[idx].Width - 1;
+ y2 = ctx->Scissor.ScissorArray[idx].Y + ctx->Scissor.ScissorArray[idx].Height - 1;
DBG("%s %d..%d,%d..%d (not inverted)\n", __FUNCTION__, x1, x2, y1, y2);
}
diff --git a/src/mesa/drivers/dri/i915/i830_vtbl.c b/src/mesa/drivers/dri/i915/i830_vtbl.c
index e0959cc..0a90fc0 100644
--- a/src/mesa/drivers/dri/i915/i830_vtbl.c
+++ b/src/mesa/drivers/dri/i915/i830_vtbl.c
@@ -837,8 +837,7 @@ i830_update_draw_buffer(struct intel_context *intel)
/* Set state we know depends on drawable parameters:
*/
- ctx->Driver.Scissor(ctx, 0, ctx->Scissor.ScissorArray[0].X, ctx->Scissor.ScissorArray[0].Y,
- ctx->Scissor.ScissorArray[0].Width, ctx->Scissor.ScissorArray[0].Height);
+ ctx->Driver.Scissor(ctx, 0);
ctx->Driver.DepthRange(ctx, 0, ctx->ViewportArray[0].Near, ctx->ViewportArray[0].Far);
diff --git a/src/mesa/drivers/dri/i915/i915_state.c b/src/mesa/drivers/dri/i915/i915_state.c
index 5f58f33..8ae7202 100644
--- a/src/mesa/drivers/dri/i915/i915_state.c
+++ b/src/mesa/drivers/dri/i915/i915_state.c
@@ -501,7 +501,7 @@ i915PolygonStipple(struct gl_context * ctx, const GLubyte * mask)
* Hardware clipping
*/
static void
-i915Scissor(struct gl_context * ctx, GLuint idx, GLint x, GLint y, GLsizei w, GLsizei h)
+i915Scissor(struct gl_context * ctx, GLuint idx)
{
struct i915_context *i915 = I915_CONTEXT(ctx);
int x1, y1, x2, y2;
@@ -509,22 +509,26 @@ i915Scissor(struct gl_context * ctx, GLuint idx, GLint x, GLint y, GLsizei w, GL
if (!ctx->DrawBuffer)
return;
- DBG("%s %d,%d %dx%d\n", __FUNCTION__, x, y, w, h);
+ DBG("%s idx=%d %d,%d %dx%d\n", __FUNCTION__, idx,
+ ctx->Scissor.ScissorArray[idx].X,
+ ctx->Scissor.ScissorArray[idx].Y,
+ ctx->Scissor.ScissorArray[idx].Width,
+ ctx->Scissor.ScissorArray[idx].Height);
if (_mesa_is_winsys_fbo(ctx->DrawBuffer)) {
- x1 = x;
- y1 = ctx->DrawBuffer->Height - (y + h);
- x2 = x + w - 1;
- y2 = y1 + h - 1;
+ x1 = ctx->Scissor.ScissorArray[idx].X;
+ y1 = ctx->DrawBuffer->Height - (ctx->Scissor.ScissorArray[idx].Y + ctx->Scissor.ScissorArray[idx].Height);
+ x2 = ctx->Scissor.ScissorArray[idx].X + ctx->Scissor.ScissorArray[idx].Width - 1;
+ y2 = y1 + ctx->Scissor.ScissorArray[idx].Height - 1;
DBG("%s %d..%d,%d..%d (inverted)\n", __FUNCTION__, x1, x2, y1, y2);
}
else {
/* FBO - not inverted
*/
- x1 = x;
- y1 = y;
- x2 = x + w - 1;
- y2 = y + h - 1;
+ x1 = ctx->Scissor.ScissorArray[idx].X;
+ y1 = ctx->Scissor.ScissorArray[idx].Y;
+ x2 = ctx->Scissor.ScissorArray[idx].X + ctx->Scissor.ScissorArray[idx].Width - 1;
+ y2 = ctx->Scissor.ScissorArray[idx].Y + ctx->Scissor.ScissorArray[idx].Height - 1;
DBG("%s %d..%d,%d..%d (not inverted)\n", __FUNCTION__, x1, x2, y1, y2);
}
diff --git a/src/mesa/drivers/dri/i915/i915_vtbl.c b/src/mesa/drivers/dri/i915/i915_vtbl.c
index c9b06a9..80a0ff3 100644
--- a/src/mesa/drivers/dri/i915/i915_vtbl.c
+++ b/src/mesa/drivers/dri/i915/i915_vtbl.c
@@ -812,8 +812,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.Scissor(ctx, 0, ctx->Scissor.ScissorArray[0].X, ctx->Scissor.ScissorArray[0].Y,
- ctx->Scissor.ScissorArray[0].Width, ctx->Scissor.ScissorArray[0].Height);
+ ctx->Driver.Scissor(ctx, 0);
/* Update culling direction which changes depending on the
* orientation of the buffer:
diff --git a/src/mesa/drivers/dri/radeon/radeon_common.c b/src/mesa/drivers/dri/radeon/radeon_common.c
index eeb73c9..692e22a 100644
--- a/src/mesa/drivers/dri/radeon/radeon_common.c
+++ b/src/mesa/drivers/dri/radeon/radeon_common.c
@@ -141,7 +141,7 @@ void radeonUpdateScissor( struct gl_context *ctx )
/* =============================================================
* Scissoring
*/
-void radeonScissor(struct gl_context* ctx, GLuint idx, GLint x, GLint y, GLsizei w, GLsizei h)
+void radeonScissor(struct gl_context* ctx, GLuint idx)
{
radeonContextPtr radeon = RADEON_CONTEXT(ctx);
if (ctx->Scissor.EnableFlags) {
diff --git a/src/mesa/drivers/dri/radeon/radeon_common.h b/src/mesa/drivers/dri/radeon/radeon_common.h
index 173b473..f586544 100644
--- a/src/mesa/drivers/dri/radeon/radeon_common.h
+++ b/src/mesa/drivers/dri/radeon/radeon_common.h
@@ -8,7 +8,7 @@
void radeonUserClear(struct gl_context *ctx, GLuint mask);
void radeonSetCliprects(radeonContextPtr radeon);
void radeonUpdateScissor( struct gl_context *ctx );
-void radeonScissor(struct gl_context* ctx, GLuint idx, GLint x, GLint y, GLsizei w, GLsizei h);
+void radeonScissor(struct gl_context* ctx, GLuint idx);
extern uint32_t radeonGetAge(radeonContextPtr radeon);
diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
index aff41f9..6083f5d 100644
--- a/src/mesa/main/dd.h
+++ b/src/mesa/main/dd.h
@@ -520,9 +520,7 @@ struct dd_function_table {
/** Set rasterization mode */
void (*RenderMode)(struct gl_context *ctx, GLenum mode );
/** Define the scissor box */
- void (*Scissor)(struct gl_context *ctx, GLuint idx,
- GLint x, GLint y,
- GLsizei width, GLsizei height);
+ void (*Scissor)(struct gl_context *ctx, GLuint idx);
/** Select flat or smooth shading */
void (*ShadeModel)(struct gl_context *ctx, GLenum mode);
/** OpenGL 2.0 two-sided StencilFunc */
diff --git a/src/mesa/main/scissor.c b/src/mesa/main/scissor.c
index 20731f7..7ebc643 100644
--- a/src/mesa/main/scissor.c
+++ b/src/mesa/main/scissor.c
@@ -86,9 +86,7 @@ _mesa_set_scissori(struct gl_context *ctx, GLuint index,
ctx->Scissor.ScissorArray[index].Height = height;
if (ctx->Driver.Scissor)
- ctx->Driver.Scissor(ctx, index,
- ctx->Scissor.ScissorArray[index].X, ctx->Scissor.ScissorArray[index].Y,
- ctx->Scissor.ScissorArray[index].Width, ctx->Scissor.ScissorArray[index].Height);
+ ctx->Driver.Scissor(ctx, index);
}
/**
--
1.8.1.2
More information about the mesa-dev
mailing list