Mesa (mesa_7_4_branch): i965: Fix occlusion query when no other WM state updates occur.

Ian Romanick idr at kemper.freedesktop.org
Mon Mar 23 19:49:48 UTC 2009


Module: Mesa
Branch: mesa_7_4_branch
Commit: 912ec292c198aa700422f53a4e71d8ee62db0129
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=912ec292c198aa700422f53a4e71d8ee62db0129

Author: Eric Anholt <eric at anholt.net>
Date:   Mon Mar 23 12:29:02 2009 -0700

i965: Fix occlusion query when no other WM state updates occur.

Turns out that XXX comment was important.  We weren't flagging the WM to
re-update with the statistics enable, so we got zeroes out of our query.

Bug #20740, fixes piglit occlusion_query test.

Signed-off-by: Eric Anholt <eric at anholt.net>
(cherry picked from commit c0d6e07909733af054cc592e2cfc6212155b0a9e)

---

 src/mesa/drivers/dri/i965/brw_wm_state.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_wm_state.c b/src/mesa/drivers/dri/i965/brw_wm_state.c
index 3c3b347..1844eba 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_state.c
@@ -109,7 +109,7 @@ wm_unit_populate_key(struct brw_context *brw, struct brw_wm_unit_key *key)
    key->uses_kill = fp->UsesKill || ctx->Color.AlphaEnabled;
    key->is_glsl = brw_wm_is_glsl(fp);
 
-   /* XXX: This needs a flag to indicate when it changes. */
+   /* _NEW_DEPTH */
    key->stats_wm = intel->stats_wm;
 
    /* _NEW_LINE */
@@ -278,7 +278,8 @@ const struct brw_tracked_state brw_wm_unit = {
       .mesa = (_NEW_POLYGON | 
 	       _NEW_POLYGONSTIPPLE | 
 	       _NEW_LINE | 
-	       _NEW_COLOR),
+	       _NEW_COLOR |
+	       _NEW_DEPTH),
 
       .brw = (BRW_NEW_FRAGMENT_PROGRAM | 
 	      BRW_NEW_CURBE_OFFSETS |




More information about the mesa-commit mailing list