turnip: disable LRZ on vkCmdClearattachments() 3D fallback path
authorSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Mon, 6 Jul 2020 07:24:05 +0000 (09:24 +0200)
committerMarge Bot <eric+marge@anholt.net>
Fri, 2 Oct 2020 03:46:47 +0000 (03:46 +0000)
Partial clears are not supported and we may end up having LRZ enabled
from past commands.

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5146>

src/freedreno/vulkan/tu_clear_blit.c

index f8ed2c1..a559661 100644 (file)
@@ -1907,6 +1907,11 @@ tu_clear_sysmem_attachments(struct tu_cmd_buffer *cmd,
             .component_enable = COND(clear_rts & (1 << i), 0xf)));
    }
 
+   if (z_clear) {
+      tu_cs_emit_regs(cs, A6XX_GRAS_LRZ_CNTL(0));
+      tu_cs_emit_regs(cs, A6XX_RB_LRZ_CNTL(0));
+   }
+
    tu_cs_emit_regs(cs, A6XX_RB_DEPTH_PLANE_CNTL());
    tu_cs_emit_regs(cs, A6XX_RB_DEPTH_CNTL(
          .z_enable = z_clear,