Mesa (7.8): i965: Stop abusing ctx-> NewState flags for storing driver internal changes.
Kristian Høgsberg
krh at kemper.freedesktop.org
Tue Mar 23 12:52:49 PDT 2010
Module: Mesa
Branch: 7.8
Commit: 516334b7fff5e0167d3f3fbcd15de08b5ca89747
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=516334b7fff5e0167d3f3fbcd15de08b5ca89747
Author: Eric Anholt <eric at anholt.net>
Date: Tue Mar 23 20:52:06 2010 -0700
i965: Stop abusing ctx->NewState flags for storing driver internal changes.
We're still abusing the flags by putting them where our driver stores
ctx->NewState changes. Making them into more restricted state change
flags would be a project for later.
Fixes a failure where calling intel_draw_buffer() too often would trip
up Mesa assertions about when Mesa state could get changed, when it hadn't.
Bug #27034.
---
src/mesa/drivers/dri/intel/intel_buffers.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/mesa/drivers/dri/intel/intel_buffers.c b/src/mesa/drivers/dri/intel/intel_buffers.c
index b106930..0480770 100644
--- a/src/mesa/drivers/dri/intel/intel_buffers.c
+++ b/src/mesa/drivers/dri/intel/intel_buffers.c
@@ -226,7 +226,7 @@ intel_draw_buffer(GLcontext * ctx, struct gl_framebuffer *fb)
* only changes with _NEW_STENCIL (which seems sensible). So flag it
* here since this is the _NEW_BUFFERS path.
*/
- ctx->NewState |= (_NEW_DEPTH | _NEW_STENCIL);
+ intel->NewGLState |= (_NEW_DEPTH | _NEW_STENCIL);
}
intel->vtbl.set_draw_region(intel, colorRegions, depthRegion,
@@ -236,7 +236,7 @@ intel_draw_buffer(GLcontext * ctx, struct gl_framebuffer *fb)
#ifdef I915
intelCalcViewport(ctx);
#else
- ctx->NewState |= _NEW_VIEWPORT;
+ intel->NewGLState |= _NEW_VIEWPORT;
#endif
/* Set state we know depends on drawable parameters:
*/
@@ -256,7 +256,7 @@ intel_draw_buffer(GLcontext * ctx, struct gl_framebuffer *fb)
if (ctx->Driver.FrontFace)
ctx->Driver.FrontFace(ctx, ctx->Polygon.FrontFace);
else
- ctx->NewState |= _NEW_POLYGON;
+ intel->NewGLState |= _NEW_POLYGON;
}
More information about the mesa-commit
mailing list