aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/gen7_misc_state.c
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2011-09-24 01:45:18 -0700
committerKenneth Graunke <[email protected]>2012-03-30 14:39:21 -0700
commitfc8edbe016348a22e4631fb1e1c7f7b87301c5ec (patch)
treed060a40b7b573965c43f2e3502378d217b248a4a /src/mesa/drivers/dri/i965/gen7_misc_state.c
parentb4410ac3944ee30bbf5455e3e649b73f559a7d38 (diff)
i965: Set "Stencil Buffer Enable" bit on Haswell.
Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/gen7_misc_state.c')
-rw-r--r--src/mesa/drivers/dri/i965/gen7_misc_state.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/gen7_misc_state.c b/src/mesa/drivers/dri/i965/gen7_misc_state.c
index d0ce54241b6..5da64349e5a 100644
--- a/src/mesa/drivers/dri/i965/gen7_misc_state.c
+++ b/src/mesa/drivers/dri/i965/gen7_misc_state.c
@@ -139,9 +139,12 @@ static void emit_depthbuffer(struct brw_context *brw)
OUT_BATCH(0);
ADVANCE_BATCH();
} else {
+ const int enabled = intel->is_haswell ? HSW_STENCIL_ENABLED : 0;
+
BEGIN_BATCH(3);
OUT_BATCH(GEN7_3DSTATE_STENCIL_BUFFER << 16 | (3 - 2));
- OUT_BATCH(stencil_mt->region->pitch * stencil_mt->region->cpp - 1);
+ OUT_BATCH(enabled |
+ (stencil_mt->region->pitch * stencil_mt->region->cpp - 1));
OUT_RELOC(stencil_mt->region->bo,
I915_GEM_DOMAIN_RENDER, I915_GEM_DOMAIN_RENDER,
0);