*/
intel_batchbuffer_emit_mi_flush(brw);
- intel_hiz_exec(brw, mt, depth_irb->mt_level, depth_irb->mt_layer,
- GEN6_HIZ_OP_DEPTH_CLEAR);
+ if (fb->NumLayers > 0) {
+ assert(fb->NumLayers == depth_irb->mt->level[depth_irb->mt_level].depth);
+ for (unsigned layer = 0; layer < fb->NumLayers; layer++) {
+ intel_hiz_exec(brw, mt, depth_irb->mt_level, layer,
+ GEN6_HIZ_OP_DEPTH_CLEAR);
+ }
+ } else {
+ intel_hiz_exec(brw, mt, depth_irb->mt_level, depth_irb->mt_layer,
+ GEN6_HIZ_OP_DEPTH_CLEAR);
+ }
if (brw->gen == 6) {
/* From the Sandy Bridge PRM, volume 2 part 1, page 314: