radeonsi: don't enable TC-compatible HTILE for stencil if stencil doesn't use it
authorMarek Olšák <marek.olsak@amd.com>
Tue, 19 May 2020 23:29:21 +0000 (19:29 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Sat, 23 May 2020 07:45:09 +0000 (03:45 -0400)
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5095>

src/gallium/drivers/radeonsi/si_blit.c

index fada003f6cfcf888722f26c0ee2002fc65e535cf..ab7c031af2353c1553ba74400e74f4062a766423 100644 (file)
@@ -367,7 +367,8 @@ static void si_decompress_depth(struct si_context *sctx, struct si_texture *tex,
        * the decompression is much worse.
        */
       if (has_htile && !tc_compat_htile &&
-          tex->surface.flags & RADEON_SURF_TC_COMPATIBLE_HTILE)
+          tex->surface.flags & RADEON_SURF_TC_COMPATIBLE_HTILE &&
+          (inplace_planes & PIPE_MASK_Z || !tex->htile_stencil_disabled))
          tex->enable_tc_compatible_htile_next_clear = true;
 
       /* Only in-place decompression needs to flush DB caches, or