[Mesa-dev] [PATCH 02/11] i965: Add missing BRW_NEW_BATCH dirty bit to Gen6+ clip state atoms.

Kenneth Graunke kenneth at whitecape.org
Sun Jan 8 14:43:51 PST 2012


Without MI_SET_CONTEXT, there's no guarantee that another program hasn't
reprogram the GPU's clip state since our last batch.  We need to submit
it every time.

Found by inspection.

NOTE: This is a candidate for the 7.11 branch.

Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
---
 src/mesa/drivers/dri/i965/gen6_clip_state.c |    1 +
 src/mesa/drivers/dri/i965/gen7_clip_state.c |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/gen6_clip_state.c b/src/mesa/drivers/dri/i965/gen6_clip_state.c
index d2a5f75..7b775a5 100644
--- a/src/mesa/drivers/dri/i965/gen6_clip_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_clip_state.c
@@ -124,6 +124,7 @@ const struct brw_tracked_state gen6_clip_state = {
    .dirty = {
       .mesa  = _NEW_TRANSFORM | _NEW_LIGHT,
       .brw   = (BRW_NEW_CONTEXT |
+                BRW_NEW_BATCH |
                 BRW_NEW_FRAGMENT_PROGRAM |
                 BRW_NEW_HIZ),
       .cache = 0
diff --git a/src/mesa/drivers/dri/i965/gen7_clip_state.c b/src/mesa/drivers/dri/i965/gen7_clip_state.c
index c32cd98..3886990 100644
--- a/src/mesa/drivers/dri/i965/gen7_clip_state.c
+++ b/src/mesa/drivers/dri/i965/gen7_clip_state.c
@@ -116,6 +116,7 @@ const struct brw_tracked_state gen7_clip_state = {
                 _NEW_LIGHT |
                 _NEW_TRANSFORM),
       .brw   = (BRW_NEW_CONTEXT |
+                BRW_NEW_BATCH |
                 BRW_NEW_FRAGMENT_PROGRAM),
       .cache = 0
    },
-- 
1.7.7.5



More information about the mesa-dev mailing list