i965/gen4: Fix assertion failures in depthstencil piglit tests.

Don't forget to set depth_mt even if !hiz_mt.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Eric Anholt 2012-10-31 12:58:49 -07:00
parent b57d2dfbf6
commit 56f8ed4c35

View file

@ -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