}
assert(!tex->tc_compatible_htile || levels_z == 0);
+ assert(!tex->tc_compatible_htile || levels_s == 0 ||
+ !r600_can_sample_zs(tex, true));
/* We may have to allocate the flushed texture here when called from
* si_decompress_subresource.
}
if (rtex->htile_buffer &&
- rtex->tc_compatible_htile &&
- !is_stencil_sampler) {
+ rtex->tc_compatible_htile) {
radeon_add_to_buffer_list_check_mem(&sctx->b, &sctx->b.gfx,
rtex->htile_buffer, usage,
RADEON_PRIO_HTILE, check_mem);
if (sscreen->b.chip_class <= VI)
meta_va += base_level_info->dcc_offset;
- } else if (tex->tc_compatible_htile && !is_stencil) {
+ } else if (tex->tc_compatible_htile) {
meta_va = tex->htile_buffer->gpu_address;
}
struct si_sampler_view *sview)
{
return rtex->db_compatible &&
- (!rtex->tc_compatible_htile || sview->is_stencil_sampler);
+ (!rtex->tc_compatible_htile ||
+ !r600_can_sample_zs(rtex, sview->is_stencil_sampler));
}
static void si_update_compressed_tex_shader_mask(struct si_context *sctx,
if (!rtex->tc_compatible_htile)
rtex->dirty_level_mask |= 1 << surf->u.tex.level;
- if (rtex->surface.flags & RADEON_SURF_SBUFFER)
+ if (rtex->surface.flags & RADEON_SURF_SBUFFER &&
+ (!rtex->tc_compatible_htile || !rtex->can_sample_s))
rtex->stencil_dirty_level_mask |= 1 << surf->u.tex.level;
}
if (sctx->framebuffer.compressed_cb_mask) {