From e5ca66806f99cc394b133d42b8adeebad2d99ae4 Mon Sep 17 00:00:00 2001 From: Jiawei Shao Date: Tue, 7 Mar 2023 00:43:08 +0000 Subject: [PATCH] Vulkan: Use VK_QUEUE_FAMILY_IGNORED on buffer barriers This patch uses VK_QUEUE_FAMILY_IGNORED on buffer barriers to align with what we are doing on image barriers. Bug: dawn:1688 Change-Id: Icabae22270fc9c92a69ce18e0a63db49de9d7481 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/122444 Reviewed-by: Corentin Wallez Reviewed-by: Austin Eng Commit-Queue: Jiawei Shao Kokoro: Kokoro --- src/dawn/native/vulkan/BufferVk.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dawn/native/vulkan/BufferVk.cpp b/src/dawn/native/vulkan/BufferVk.cpp index 73150bcdf3..bfa2e519a1 100644 --- a/src/dawn/native/vulkan/BufferVk.cpp +++ b/src/dawn/native/vulkan/BufferVk.cpp @@ -314,8 +314,8 @@ bool Buffer::TrackUsageAndGetResourceBarrier(CommandRecordingContext* recordingC barrier->pNext = nullptr; barrier->srcAccessMask = VulkanAccessFlags(mLastUsage); barrier->dstAccessMask = VulkanAccessFlags(usage); - barrier->srcQueueFamilyIndex = 0; - barrier->dstQueueFamilyIndex = 0; + barrier->srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED; + barrier->dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED; barrier->buffer = mHandle; barrier->offset = 0; // VK_WHOLE_SIZE doesn't work on old Windows Intel Vulkan drivers, so we don't use it.