[Mesa-dev] [PATCH 01/40] i915: Remove spurious calls to DepthRange
Ian Romanick
idr at freedesktop.org
Fri Jan 10 17:40:02 PST 2014
From: Ian Romanick <ian.d.romanick at intel.com>
For both i830 and i915, the driver DepthRange function just calls
intelCalcViewport.
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
Cc: Eric Anholt <eric at anholt.net>
---
src/mesa/drivers/dri/i915/i830_vtbl.c | 6 +-----
src/mesa/drivers/dri/i915/i915_vtbl.c | 5 +----
2 files changed, 2 insertions(+), 9 deletions(-)
diff --git a/src/mesa/drivers/dri/i915/i830_vtbl.c b/src/mesa/drivers/dri/i915/i830_vtbl.c
index f988a83..f8749a5 100644
--- a/src/mesa/drivers/dri/i915/i830_vtbl.c
+++ b/src/mesa/drivers/dri/i915/i830_vtbl.c
@@ -832,16 +832,12 @@ i830_update_draw_buffer(struct intel_context *intel)
fb->_NumColorDrawBuffers);
intel->NewGLState |= _NEW_BUFFERS;
- /* update viewport since it depends on window size */
- intelCalcViewport(ctx);
-
/* 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.DepthRange(ctx, 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_vtbl.c b/src/mesa/drivers/dri/i915/i915_vtbl.c
index 3368fe4..755d322 100644
--- a/src/mesa/drivers/dri/i915/i915_vtbl.c
+++ b/src/mesa/drivers/dri/i915/i915_vtbl.c
@@ -806,14 +806,11 @@ i915_update_draw_buffer(struct intel_context *intel)
fb->_NumColorDrawBuffers);
intel->NewGLState |= _NEW_BUFFERS;
- /* update viewport since it depends on window size */
- intelCalcViewport(ctx);
-
/* 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.DepthRange(ctx, ctx->Viewport.Near, ctx->Viewport.Far);
/* Update culling direction which changes depending on the
* orientation of the buffer:
--
1.8.1.4
More information about the mesa-dev
mailing list