radv: Add a flush postamble on GFX6.

Create a CS which contains just a cache flush,
that can be used as a postamble in command submissions.

According to RadeonSI code, the kernel flushes L2
before shaders are finished on GFX6.

Previously, RADV always added a flush at the end of
each command buffer. The flush postamble should be
a less wasteful alternative to that.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31695>
This commit is contained in:
Timur Kristóf
2024-10-16 23:11:13 +02:00
committed by Marge Bot
parent b3adf02b22
commit 030a7510ce
2 changed files with 54 additions and 1 deletions
+1
View File
@@ -67,6 +67,7 @@ struct radv_queue_state {
struct radeon_cmdbuf *continue_preamble_cs;
struct radeon_cmdbuf *gang_wait_preamble_cs;
struct radeon_cmdbuf *gang_wait_postamble_cs;
struct radeon_cmdbuf *flush_postamble_cs; /* GFX6 only */
/* the uses_shadow_regs here will be set only for general queue */
bool uses_shadow_regs;