turnip: add emit renderpass cache flushes for sysmem 3D CmdClearAttachments
authorJonathan Marek <jonathan@marek.ca>
Thu, 11 Jun 2020 13:49:23 +0000 (09:49 -0400)
committerMarge Bot <eric+marge@anholt.net>
Fri, 12 Jun 2020 15:09:07 +0000 (15:09 +0000)
This clear path behaves like a draw, it needs the same flush as tu_draw.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5426>

src/freedreno/vulkan/tu_clear_blit.c
src/freedreno/vulkan/tu_cmd_buffer.c
src/freedreno/vulkan/tu_private.h

index 2ca9860161c9894a565398caffd5c3a246d2bc8f..5635375cc2356aaab8c3afc9789fe3341d6fd15c 100644 (file)
@@ -2070,6 +2070,9 @@ tu_clear_sysmem_attachments(struct tu_cmd_buffer *cmd,
       return;
    }
 
+   /* This clear path behaves like a draw, needs the same flush as tu_draw */
+   tu_emit_cache_flush_renderpass(cmd, cs);
+
    tu_cs_emit_pkt4(cs, REG_A6XX_SP_FS_OUTPUT_CNTL0, 2);
    tu_cs_emit(cs, A6XX_SP_FS_OUTPUT_CNTL0_DEPTH_REGID(0xfc) |
                   A6XX_SP_FS_OUTPUT_CNTL0_SAMPMASK_REGID(0xfc) |
index af0eca07096c7b273aee86449ebe5ce5237c7b72..0eedda6a54cdb23f654e64daed6f50a0a6a98987 100644 (file)
@@ -383,7 +383,7 @@ tu_emit_cache_flush(struct tu_cmd_buffer *cmd_buffer,
 
 /* Renderpass cache flushes */
 
-static void
+void
 tu_emit_cache_flush_renderpass(struct tu_cmd_buffer *cmd_buffer,
                                struct tu_cs *cs)
 {
index 1e1fdc1c61ab8b98ea9aa2f0b89bdf26f0ec3f39..65aa6a5660e3c3cff5801100bc6273c2fa597c17 100644 (file)
@@ -1190,6 +1190,10 @@ struct tu_reg_value {
    uint32_t bo_shift;
 };
 
+
+void tu_emit_cache_flush_renderpass(struct tu_cmd_buffer *cmd_buffer,
+                                    struct tu_cs *cs);
+
 void tu_emit_cache_flush_ccu(struct tu_cmd_buffer *cmd_buffer,
                              struct tu_cs *cs,
                              enum tu_cmd_ccu_state ccu_state);