diff options
author | Eric Anholt <[email protected]> | 2011-09-19 09:26:50 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2011-09-20 10:20:06 -0700 |
commit | 7288d010e0afeade5357502fdc018fc4928330f6 (patch) | |
tree | de5d57d06e99e792aa9ee707c8ad432bf4e998ff /src | |
parent | 4c9b09d3c2cc50b1dd46b9eb8a89d6086016484b (diff) |
i965: Fix polygon stipple offset state flagging.
_NEW_WINDOW_POS wasn't a real Mesa state flag, but we were missing
_NEW_BUFFERS to update the stipple offset when FBO binding or window
size changed, and _NEW_POLYGON to update when stippling gets enabled.
Fixes oglconform's tristrip test.
Reviewed-by: Kenneth Graunke <[email protected]>
Reviewed-by: Yuanhan Liu <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_misc_state.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_misc_state.c b/src/mesa/drivers/dri/i965/brw_misc_state.c index 0807554bed9..ce4fc844209 100644 --- a/src/mesa/drivers/dri/i965/brw_misc_state.c +++ b/src/mesa/drivers/dri/i965/brw_misc_state.c @@ -498,6 +498,7 @@ static void upload_polygon_stipple_offset(struct brw_context *brw) struct intel_context *intel = &brw->intel; struct gl_context *ctx = &brw->intel.ctx; + /* _NEW_POLYGON */ if (!ctx->Polygon.StippleFlag) return; @@ -507,7 +508,9 @@ static void upload_polygon_stipple_offset(struct brw_context *brw) BEGIN_BATCH(2); OUT_BATCH(_3DSTATE_POLY_STIPPLE_OFFSET << 16 | (2-2)); - /* If we're drawing to a system window (ctx->DrawBuffer->Name == 0), + /* _NEW_BUFFERS + * + * If we're drawing to a system window (ctx->DrawBuffer->Name == 0), * we have to invert the Y axis in order to match the OpenGL * pixel coordinate system, and our offset must be matched * to the window position. If we're drawing to a FBO @@ -522,11 +525,10 @@ static void upload_polygon_stipple_offset(struct brw_context *brw) CACHED_BATCH(); } -#define _NEW_WINDOW_POS 0x40000000 - const struct brw_tracked_state brw_polygon_stipple_offset = { .dirty = { - .mesa = _NEW_WINDOW_POS | _NEW_POLYGONSTIPPLE, + .mesa = (_NEW_BUFFERS | + _NEW_POLYGON), .brw = BRW_NEW_CONTEXT, .cache = 0 }, |