radv: Flush L2 cache for non-L2-coherent images in EndCommandBuffer.

This fixes a CTS hang on Hawaii.

We previously only did a CB/DB flush,
but that doesn't include a L2 cache flush.
Also fix the comment that said this is for GFX9+.

Fixes: 7c62f6fa01
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/31906>
This commit is contained in:
Timur Kristóf
2024-10-30 14:08:29 +01:00
committed by Marge Bot
parent 7015e22cb6
commit 96b95c8427
+3 -4
View File
@@ -7371,13 +7371,12 @@ radv_EndCommandBuffer(VkCommandBuffer commandBuffer)
*/
cmd_buffer->state.flush_bits |= cmd_buffer->active_query_flush_bits;
/* Flush noncoherent images on GFX9+ so we can assume they're clean on the start of a
/* Flush noncoherent images when needed so we can assume they're clean on the start of a
* command buffer.
*/
if (cmd_buffer->state.rb_noncoherent_dirty && !can_skip_buffer_l2_flushes(device))
cmd_buffer->state.flush_bits |= radv_src_access_flush(
cmd_buffer, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT,
VK_ACCESS_2_COLOR_ATTACHMENT_WRITE_BIT | VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT, NULL);
cmd_buffer->state.flush_bits |= radv_src_access_flush(cmd_buffer, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT,
VK_ACCESS_2_TRANSFER_WRITE_BIT, NULL);
/* Since NGG streamout uses GDS, we need to make GDS idle when
* we leave the IB, otherwise another process might overwrite