Skip to content
Snippets Groups Projects
Commit a7e64ab6 authored by Connor Abbott's avatar Connor Abbott Committed by Marge Bot
Browse files

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: 487aa807 ("tu: Rewrite flushing to use barriers")
Closes: #6987
Part-of: <mesa/mesa!17940>
parent de55058c
No related branches found
No related tags found
Loading
......@@ -2918,6 +2918,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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment