i965: Fix occlusion query when no other WM state updates occur.
authorEric Anholt <eric@anholt.net>
Mon, 23 Mar 2009 19:29:02 +0000 (12:29 -0700)
committerEric Anholt <eric@anholt.net>
Mon, 23 Mar 2009 19:37:00 +0000 (12:37 -0700)
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@anholt.net>
src/mesa/drivers/dri/i965/brw_wm_state.c

index 63fc8a004fd466a833675edef355a6d4279949f8..5b14074502a8331c377d8341c36c26024c59ea07 100644 (file)
@@ -113,7 +113,7 @@ wm_unit_populate_key(struct brw_context *brw, struct brw_wm_unit_key *key)
    /* temporary sanity check assertion */
    ASSERT(bfp->isGLSL == 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 */
@@ -282,7 +282,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 |