summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConnor Abbott <cwabbott0@gmail.com>2022-08-08 15:52:49 +0200
committerDylan Baker <dylan.c.baker@intel.com>2022-08-11 10:30:38 -0700
commit5796cff61aeaa27a5fcb2e2e725cf4d809769756 (patch)
tree34e4e264b809417444939f54c6266691fe44c44c
parent71703783c22690ad0e14cd3eeb79619706bc04a6 (diff)
tu: Fix sysmem depth attachment clear flushing
We can't invalidate CCU if there is any dirty data that hasn't been flushed yet. In the case where we clear depth, we know that the depth attachment itself isn't dirty but there may be dirty data from other renderpasses. Therefore we need to flush before invalidating depth. Fixes: 487aa80 ("tu: Rewrite flushing to use barriers") Closes: #6987 Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17940> (cherry picked from commit a7e64ab63c5aa0b5c2079badc3ae0d5668c234f8)
-rw-r--r--.pick_status.json2
-rw-r--r--src/freedreno/vulkan/tu_clear_blit.c1
2 files changed, 2 insertions, 1 deletions
diff --git a/.pick_status.json b/.pick_status.json
index a7b5fe33c77..5f4a77e62f3 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -769,7 +769,7 @@
"description": "tu: Fix sysmem depth attachment clear flushing",
"nominated": true,
"nomination_type": 1,
- "resolution": 0,
+ "resolution": 1,
"main_sha": null,
"because_sha": "487aa807bd1b70602fcb6fbdabd101d4cff7c07b"
},
diff --git a/src/freedreno/vulkan/tu_clear_blit.c b/src/freedreno/vulkan/tu_clear_blit.c
index f6d73e8cfdd..6caa31beb95 100644
--- a/src/freedreno/vulkan/tu_clear_blit.c
+++ b/src/freedreno/vulkan/tu_clear_blit.c
@@ -2693,6 +2693,7 @@ tu_clear_sysmem_attachment(struct tu_cmd_buffer *cmd,
*/
if (vk_format_is_depth_or_stencil(attachment->format)) {
tu6_emit_event_write(cmd, cs, PC_CCU_FLUSH_COLOR_TS);
+ tu6_emit_event_write(cmd, cs, PC_CCU_FLUSH_DEPTH_TS);
tu6_emit_event_write(cmd, cs, PC_CCU_INVALIDATE_DEPTH);
} else {
tu6_emit_event_write(cmd, cs, PC_CCU_FLUSH_COLOR_TS);