From 96b95c84279e3bb8c0dcebfb0e811bf2b8633fc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timur=20Krist=C3=B3f?= Date: Wed, 30 Oct 2024 14:08:29 +0100 Subject: [PATCH] radv: Flush L2 cache for non-L2-coherent images in EndCommandBuffer. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: 7c62f6fa01d7c0d9d7eabec1c545950af20d0c92 Signed-off-by: Timur Kristóf Reviewed-by: Samuel Pitoiset Part-of: --- src/amd/vulkan/radv_cmd_buffer.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c index b1bac9e9c6f..1b66e4847fa 100644 --- a/src/amd/vulkan/radv_cmd_buffer.c +++ b/src/amd/vulkan/radv_cmd_buffer.c @@ -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