Mesa (7.9): i965: Also enable CC statistics when doing OQs.
Eric Anholt
anholt at kemper.freedesktop.org
Wed Sep 22 20:46:51 UTC 2010
Module: Mesa
Branch: 7.9
Commit: 8f4c99a9af876494cb9a0f4e804a7b0ba7f1db90
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=8f4c99a9af876494cb9a0f4e804a7b0ba7f1db90
Author: Eric Anholt <eric at anholt.net>
Date: Tue Sep 21 10:53:34 2010 -0700
i965: Also enable CC statistics when doing OQs.
This is required by the spec, so respect that.
(oh, and it was required to actually fix occlusion-query-discard,
though I didn't know at the time of the commit since o-q-discard was
hanging the GPU)
(cherry picked from commit 4a0bc4716db7bbcbcd65c0f993704733f47d41f7)
---
src/mesa/drivers/dri/i965/brw_cc.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_cc.c b/src/mesa/drivers/dri/i965/brw_cc.c
index cfce5d3..8430ee0 100644
--- a/src/mesa/drivers/dri/i965/brw_cc.c
+++ b/src/mesa/drivers/dri/i965/brw_cc.c
@@ -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));
More information about the mesa-commit
mailing list