i965/draw: Fix adding the stencil bo to the depth cache

Fix the case where stencil writes are enabled on a depth stencil
texture. Found by inspection.

v2: Fix message to allow for depth stencil writes (Topi).

Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
This commit is contained in:
Nanley Chery 2018-06-08 13:24:09 -07:00
parent be07cc43a2
commit 63d428dc17
1 changed files with 1 additions and 1 deletions

View File

@ -623,10 +623,10 @@ brw_postdraw_set_buffers_need_resolve(struct brw_context *brw)
}
if (stencil_irb && brw->stencil_write_enabled) {
brw_depth_cache_add_bo(brw, stencil_irb->mt->bo);
struct intel_mipmap_tree *stencil_mt =
stencil_irb->mt->stencil_mt != NULL ?
stencil_irb->mt->stencil_mt : stencil_irb->mt;
brw_depth_cache_add_bo(brw, stencil_mt->bo);
intel_miptree_finish_write(brw, stencil_mt, stencil_irb->mt_level,
stencil_irb->mt_layer,
stencil_irb->layer_count, ISL_AUX_USAGE_NONE);