summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2012-10-31 12:58:49 -0700
committerEric Anholt <[email protected]>2012-11-01 09:22:09 -0700
commit56f8ed4c356f9994d150552e9c18ec35717ce503 (patch)
treeca98d80c93dbe27d0093286b4dbae7a249026e39
parentb57d2dfbf64889813d21f7104443db9180da98bb (diff)
i965/gen4: Fix assertion failures in depthstencil piglit tests.
Don't forget to set depth_mt even if !hiz_mt. Reviewed-by: Kenneth Graunke <[email protected]>
-rw-r--r--src/mesa/drivers/dri/i965/brw_misc_state.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_misc_state.c b/src/mesa/drivers/dri/i965/brw_misc_state.c
index ce23fa0293f..d4b4c758284 100644
--- a/src/mesa/drivers/dri/i965/brw_misc_state.c
+++ b/src/mesa/drivers/dri/i965/brw_misc_state.c
@@ -416,11 +416,12 @@ static void emit_depthbuffer(struct brw_context *brw)
unsigned int len;
bool separate_stencil = false;
- if (depth_irb &&
- depth_irb->mt &&
- depth_irb->mt->hiz_mt) {
+ if (depth_irb){
depth_mt = depth_irb->mt;
- hiz_region = depth_irb->mt->hiz_mt->region;
+ if (depth_mt &&
+ depth_mt->hiz_mt) {
+ hiz_region = depth_irb->mt->hiz_mt->region;
+ }
}
/* 3DSTATE_DEPTH_BUFFER, 3DSTATE_STENCIL_BUFFER are both