From f3195e77dc4ad7dcbaaa518fcd3a9a35d68178a7 Mon Sep 17 00:00:00 2001 From: Karmjit Mahil Date: Fri, 2 Aug 2024 17:13:39 +0200 Subject: [PATCH] tu: Set `TU_ACCESS_CCHE_READ` for transfer ops with read access Transfer ops also use CCHE since they use the same path as texture access. This addresses the flakiness seen in KHR-GL46.shader_storage_buffer_object.advanced-usage-sync-cs CCHE wasn't being invalidated between the compute op and transfer op which would sometimes lead to old/invalid data to be copied in the transfer op. Fixes: fb1c3f7f5de ("tu: Implement CCHE invalidation") Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11458 Signed-off-by: Karmjit Mahil Part-of: (cherry picked from commit cf9588bae6abb291786f5eb3975b687d6047574c) --- .pick_status.json | 2 +- src/freedreno/vulkan/tu_cmd_buffer.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 278a6e6e3bf..0ee0b226856 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -5524,7 +5524,7 @@ "description": "tu: Set `TU_ACCESS_CCHE_READ` for transfer ops with read access", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "fb1c3f7f5de6642fcd127724a0cea5643d39d7ee", "notes": null diff --git a/src/freedreno/vulkan/tu_cmd_buffer.cc b/src/freedreno/vulkan/tu_cmd_buffer.cc index c583c8c2d7e..8a6e2f52af5 100644 --- a/src/freedreno/vulkan/tu_cmd_buffer.cc +++ b/src/freedreno/vulkan/tu_cmd_buffer.cc @@ -3597,7 +3597,7 @@ vk2tu_access(VkAccessFlags2 flags, VkPipelineStageFlags2 stages, bool image_only VK_PIPELINE_STAGE_2_BLIT_BIT | VK_PIPELINE_STAGE_2_RESOLVE_BIT | VK_PIPELINE_STAGE_2_ALL_TRANSFER_BIT)) { - mask |= TU_ACCESS_UCHE_READ; + mask |= TU_ACCESS_UCHE_READ | TU_ACCESS_CCHE_READ; } return mask;