i965: Also enable CC statistics when doing OQs.
authorEric Anholt <eric@anholt.net>
Tue, 21 Sep 2010 17:53:34 +0000 (10:53 -0700)
committerEric Anholt <eric@anholt.net>
Tue, 21 Sep 2010 19:29:57 +0000 (12:29 -0700)
This is required by the spec, so respect that.

src/mesa/drivers/dri/i965/brw_cc.c

index cfce5d314051b0bd5a4f42e5e6f86abb40acf9fc..8430ee0cfa061b0e49545292d20f063ff01a9eb0 100644 (file)
@@ -90,6 +90,7 @@ static void prepare_cc_unit(struct brw_context *brw)
  */
 static void upload_cc_unit(struct brw_context *brw)
 {
+   struct intel_context *intel = &brw->intel;
    GLcontext *ctx = &brw->intel.ctx;
    struct brw_cc_unit_state cc;
    void *map;
@@ -203,12 +204,12 @@ static void upload_cc_unit(struct brw_context *brw)
       cc.cc2.depth_write_enable = ctx->Depth.Mask;
    }
 
+   if (intel->stats_wm || (INTEL_DEBUG & DEBUG_STATS))
+      cc.cc5.statistics_enable = 1;
+
    /* CACHE_NEW_CC_VP */
    cc.cc4.cc_viewport_state_offset = brw->cc.vp_bo->offset >> 5; /* reloc */
 
-   if (INTEL_DEBUG & DEBUG_STATS)
-      cc.cc5.statistics_enable = 1;
-
    map = brw_state_batch(brw, sizeof(cc), 64,
                         &brw->cc.state_bo, &brw->cc.state_offset);
    memcpy(map, &cc, sizeof(cc));