Mesa (7.11): i965: Remove i915 paths from brw_update_draw_buffers().
Eric Anholt
anholt at kemper.freedesktop.org
Wed Jul 20 19:53:26 UTC 2011
Module: Mesa
Branch: 7.11
Commit: c6ddeeed7a17bc7ce351f4fa1f105f495e068913
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c6ddeeed7a17bc7ce351f4fa1f105f495e068913
Author: Eric Anholt <eric at anholt.net>
Date: Tue Jul 12 09:52:04 2011 -0700
i965: Remove i915 paths from brw_update_draw_buffers().
Reviewed-by: Chad Versace <chad at chad-versace.us>
(cherry picked from commit 94efc350b4146b2fb82d45eeb78bd6be6f06fb9c)
---
src/mesa/drivers/dri/i965/brw_vtbl.c | 48 ++++++++--------------------------
1 files changed, 11 insertions(+), 37 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_vtbl.c b/src/mesa/drivers/dri/i965/brw_vtbl.c
index 25b3010..2b288e7 100644
--- a/src/mesa/drivers/dri/i965/brw_vtbl.c
+++ b/src/mesa/drivers/dri/i965/brw_vtbl.c
@@ -154,51 +154,25 @@ brw_update_draw_buffer(struct intel_context *intel)
assert(intel->has_separate_stencil);
}
- /*
- * Update depth and stencil test state
+ /* Mesa's Stencil._Enabled field is updated when
+ * _NEW_BUFFERS | _NEW_STENCIL, but i965 code assumes that the value
+ * only changes with _NEW_STENCIL (which seems sensible). So flag it
+ * here since this is the _NEW_BUFFERS path.
*/
- if (ctx->Driver.Enable) {
- ctx->Driver.Enable(ctx, GL_DEPTH_TEST,
- (ctx->Depth.Test && fb->Visual.depthBits > 0));
- ctx->Driver.Enable(ctx, GL_STENCIL_TEST,
- (ctx->Stencil.Enabled && fb->Visual.stencilBits > 0));
- }
- else {
- /* Mesa's Stencil._Enabled field is updated when
- * _NEW_BUFFERS | _NEW_STENCIL, but i965 code assumes that the value
- * only changes with _NEW_STENCIL (which seems sensible). So flag it
- * here since this is the _NEW_BUFFERS path.
- */
- intel->NewGLState |= (_NEW_DEPTH | _NEW_STENCIL);
- }
+ intel->NewGLState |= (_NEW_DEPTH | _NEW_STENCIL);
- intel->NewGLState |= _NEW_BUFFERS;
-
- /* update viewport since it depends on window size */
-#ifdef I915
- intelCalcViewport(ctx);
-#else
- intel->NewGLState |= _NEW_VIEWPORT;
-#endif
- /* Set state we know depends on drawable parameters:
+ /* The driver uses this in places that need to look up
+ * renderbuffers' buffer objects.
*/
- if (ctx->Driver.Scissor)
- ctx->Driver.Scissor(ctx, ctx->Scissor.X, ctx->Scissor.Y,
- ctx->Scissor.Width, ctx->Scissor.Height);
- intel->NewGLState |= _NEW_SCISSOR;
+ intel->NewGLState |= _NEW_BUFFERS;
- if (ctx->Driver.DepthRange)
- ctx->Driver.DepthRange(ctx,
- ctx->Viewport.Near,
- ctx->Viewport.Far);
+ /* update viewport/scissor since it depends on window size */
+ intel->NewGLState |= _NEW_VIEWPORT | _NEW_SCISSOR;
/* Update culling direction which changes depending on the
* orientation of the buffer:
*/
- if (ctx->Driver.FrontFace)
- ctx->Driver.FrontFace(ctx, ctx->Polygon.FrontFace);
- else
- intel->NewGLState |= _NEW_POLYGON;
+ intel->NewGLState |= _NEW_POLYGON;
}
/**
More information about the mesa-commit
mailing list