i915: Remove spurious calls to DepthRange
authorIan Romanick <ian.d.romanick@intel.com>
Tue, 5 Nov 2013 22:34:03 +0000 (14:34 -0800)
committerIan Romanick <ian.d.romanick@intel.com>
Wed, 15 Jan 2014 18:02:47 +0000 (10:02 -0800)
For both i830 and i915, the driver DepthRange function just calls
intelCalcViewport.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/i915/i830_vtbl.c
src/mesa/drivers/dri/i915/i915_vtbl.c

index f988a834ad8a14f61362afe73799e5ae86e22232..f8749a53f9a0c7c68dd2ab145c27e03acdfb82f7 100644 (file)
@@ -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:
     */
index 3368fe43f2e1ccffaec7cfb571143c5c6457993a..755d32291eae4ea30a15b2d3b3ea8210a5d232cd 100644 (file)
@@ -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: