diff options
author | Ian Romanick <[email protected]> | 2013-11-05 14:22:30 -0800 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2014-01-15 10:02:48 -0800 |
commit | a05c596a00916ce6a9c9d35ff36cd1e401fddd43 (patch) | |
tree | a91938301544ac71d5cc1557a4881b23301a339a /src/mesa/drivers/dri/i915 | |
parent | 6dbab6b2bb29e3b0595762920ef17e2ae5a9bf3a (diff) |
mesa: Eliminate parameters to dd_function_table::Scissor
The i830 and i915 drivers used them, but they didn't really need to.
They will just be annoying in future patches.
Signed-off-by: Ian Romanick <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i915')
-rw-r--r-- | src/mesa/drivers/dri/i915/i830_state.c | 22 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i915/i830_vtbl.c | 3 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i915/i915_state.c | 22 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i915/i915_vtbl.c | 3 |
4 files changed, 26 insertions, 24 deletions
diff --git a/src/mesa/drivers/dri/i915/i830_state.c b/src/mesa/drivers/dri/i915/i830_state.c index cf850588aad..a69c7ea5807 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, GLint x, GLint y, GLsizei w, GLsizei h) +i830Scissor(struct gl_context * ctx) { struct i830_context *i830 = i830_context(ctx); int x1, y1, x2, y2; @@ -535,22 +535,24 @@ i830Scissor(struct gl_context * ctx, GLint x, GLint y, GLsizei w, GLsizei h) if (!ctx->DrawBuffer) return; - DBG("%s %d,%d %dx%d\n", __FUNCTION__, x, y, w, h); + DBG("%s %d,%d %dx%d\n", __FUNCTION__, + ctx->Scissor.X, ctx->Scissor.Y, + ctx->Scissor.Width, ctx->Scissor.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.X; + y1 = ctx->DrawBuffer->Height - (ctx->Scissor.Y + ctx->Scissor.Height); + x2 = ctx->Scissor.X + ctx->Scissor.Width - 1; + y2 = y1 + ctx->Scissor.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.X; + y1 = ctx->Scissor.Y; + x2 = ctx->Scissor.X + ctx->Scissor.Width - 1; + y2 = ctx->Scissor.Y + ctx->Scissor.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 f8749a53f9a..4a9ea5666b1 100644 --- a/src/mesa/drivers/dri/i915/i830_vtbl.c +++ b/src/mesa/drivers/dri/i915/i830_vtbl.c @@ -835,8 +835,7 @@ i830_update_draw_buffer(struct intel_context *intel) /* Set state we know depends on drawable parameters: */ intelCalcViewport(ctx); - ctx->Driver.Scissor(ctx, ctx->Scissor.X, ctx->Scissor.Y, - ctx->Scissor.Width, ctx->Scissor.Height); + ctx->Driver.Scissor(ctx); /* 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 f867f12ed69..9a25b9e6a06 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, GLint x, GLint y, GLsizei w, GLsizei h) +i915Scissor(struct gl_context * ctx) { struct i915_context *i915 = I915_CONTEXT(ctx); int x1, y1, x2, y2; @@ -509,22 +509,24 @@ i915Scissor(struct gl_context * ctx, GLint x, GLint y, GLsizei w, GLsizei h) if (!ctx->DrawBuffer) return; - DBG("%s %d,%d %dx%d\n", __FUNCTION__, x, y, w, h); + DBG("%s %d,%d %dx%d\n", __FUNCTION__, + ctx->Scissor.X, ctx->Scissor.Y, + ctx->Scissor.Width, ctx->Scissor.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.X; + y1 = ctx->DrawBuffer->Height - (ctx->Scissor.Y + ctx->Scissor.Height); + x2 = ctx->Scissor.X + ctx->Scissor.Width - 1; + y2 = y1 + ctx->Scissor.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.X; + y1 = ctx->Scissor.Y; + x2 = ctx->Scissor.X + ctx->Scissor.Width - 1; + y2 = ctx->Scissor.Y + ctx->Scissor.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 755d32291ea..d9675c13f5f 100644 --- a/src/mesa/drivers/dri/i915/i915_vtbl.c +++ b/src/mesa/drivers/dri/i915/i915_vtbl.c @@ -809,8 +809,7 @@ i915_update_draw_buffer(struct intel_context *intel) /* Set state we know depends on drawable parameters: */ intelCalcViewport(ctx); - ctx->Driver.Scissor(ctx, ctx->Scissor.X, ctx->Scissor.Y, - ctx->Scissor.Width, ctx->Scissor.Height); + ctx->Driver.Scissor(ctx); /* Update culling direction which changes depending on the * orientation of the buffer: |