From f7aeeb194dada8196d83c89d36e954cfa934d730 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tapani=20P=C3=A4lli?= Date: Tue, 28 Apr 2026 07:41:47 +0300 Subject: [PATCH] anv: do not use resource barrier with split barriers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes failing CTS tests using asymmetric and non-asymmetric (regular) split barriers. Cc: mesa-stable Closes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/15310 Signed-off-by: Tapani Pälli Reviewed-by: Lionel Landwerlin (cherry picked from commit bdaf8b6b39f39a04a332c6d89af33be0e7858256) Part-of: --- .pick_status.json | 2 +- src/intel/vulkan/genX_cmd_buffer.c | 23 ++++++++++------------- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 537f1ab3e8e..eff5ac5afd0 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -654,7 +654,7 @@ "description": "anv: do not use resource barrier with split barriers", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c index ce51eb3c7d0..1713dabc147 100644 --- a/src/intel/vulkan/genX_cmd_buffer.c +++ b/src/intel/vulkan/genX_cmd_buffer.c @@ -1937,22 +1937,19 @@ can_use_resource_barrier(const struct intel_device_info *devinfo, engine_class != INTEL_ENGINE_CLASS_COMPUTE) return false; - /* Wa_18039014283: + /* Split barriers (VkEvent) are tricky to support with resource barrier. * - * RESOURCE_BARRIER instructions with a Type=Signal, SignalStage=GPGPU are - * not functional. Since the main use case for this is VkEvent and VkEvent - * might not have exactly matching informations on both signal/wait sides - * (see - * https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdWaitEvents.html), - * this is somewhat unusable. + * From Bspec 56054 (RESOURCE_BARRIER_BODY): + * "Split barrier pairs need to have identical values for all + * fields other than the barrier type." * - * We're also seeing other problems with this, for example with - * dEQP-VK.synchronization2.op.single_queue.event.write_blit_image_read_copy_image_to_buffer.image_128_r32_uint - * So HW might be more broken than expected. + * Vulkan does not require signal and wait barriers to have identical values, see: + * https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdWaitEvents.html + * + * This rule handles also Wa_18039014283. */ - if (intel_needs_workaround(devinfo, 18039014283) && - (!anv_address_is_null(signal_addr) || - !anv_address_is_null(wait_addr))) + if (!anv_address_is_null(signal_addr) || + !anv_address_is_null(wait_addr)) return false; /* The HW doesn't support signaling from the top of pipeline */