diff options
author | Jonathan Marek <[email protected]> | 2020-06-11 09:49:23 -0400 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-06-12 15:09:07 +0000 |
commit | c93753e6181b82988c84e9af43d3aa377a6eae36 (patch) | |
tree | d4b5623cf366a3497eb25bd74649fa593c701f3d /src/freedreno | |
parent | 72d7df40a5e5b50330c4d4168aa681bae2b61b22 (diff) |
turnip: add emit renderpass cache flushes for sysmem 3D CmdClearAttachments
This clear path behaves like a draw, it needs the same flush as tu_draw.
Signed-off-by: Jonathan Marek <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5426>
Diffstat (limited to 'src/freedreno')
-rw-r--r-- | src/freedreno/vulkan/tu_clear_blit.c | 3 | ||||
-rw-r--r-- | src/freedreno/vulkan/tu_cmd_buffer.c | 2 | ||||
-rw-r--r-- | src/freedreno/vulkan/tu_private.h | 4 |
3 files changed, 8 insertions, 1 deletions
diff --git a/src/freedreno/vulkan/tu_clear_blit.c b/src/freedreno/vulkan/tu_clear_blit.c index 2ca9860161c..5635375cc23 100644 --- a/src/freedreno/vulkan/tu_clear_blit.c +++ b/src/freedreno/vulkan/tu_clear_blit.c @@ -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) | diff --git a/src/freedreno/vulkan/tu_cmd_buffer.c b/src/freedreno/vulkan/tu_cmd_buffer.c index af0eca07096..0eedda6a54c 100644 --- a/src/freedreno/vulkan/tu_cmd_buffer.c +++ b/src/freedreno/vulkan/tu_cmd_buffer.c @@ -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) { diff --git a/src/freedreno/vulkan/tu_private.h b/src/freedreno/vulkan/tu_private.h index 1e1fdc1c61a..65aa6a5660e 100644 --- a/src/freedreno/vulkan/tu_private.h +++ b/src/freedreno/vulkan/tu_private.h @@ -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); |