From 1e2c2f2af3d691310c7231cb601a22a084d004d0 Mon Sep 17 00:00:00 2001 From: Corentin Wallez Date: Thu, 28 Nov 2019 09:42:24 +0000 Subject: [PATCH] Vulkan: Don't require TRANSFER for universal queues The Vulkan specification requires that GRAPHICS and COMPUTE queue support transfer operations, but it doesn't require them to expose the TRANSFER flag. Make Dawn not require that flag so it can find a universal queue on Adreno drivers. BUG=dawn:286 Change-Id: Id4811e2077b27aa7db5ce554a4fd919c3cdcdb96 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14101 Reviewed-by: David Turner Reviewed-by: Austin Eng Commit-Queue: Corentin Wallez --- src/dawn_native/vulkan/DeviceVk.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dawn_native/vulkan/DeviceVk.cpp b/src/dawn_native/vulkan/DeviceVk.cpp index b9f326a119..a5f7788473 100644 --- a/src/dawn_native/vulkan/DeviceVk.cpp +++ b/src/dawn_native/vulkan/DeviceVk.cpp @@ -403,8 +403,8 @@ namespace dawn_native { namespace vulkan { // Find a universal queue family { - constexpr uint32_t kUniversalFlags = - VK_QUEUE_GRAPHICS_BIT | VK_QUEUE_COMPUTE_BIT | VK_QUEUE_TRANSFER_BIT; + // Note that GRAPHICS and COMPUTE imply TRANSFER so we don't need to check for it. + constexpr uint32_t kUniversalFlags = VK_QUEUE_GRAPHICS_BIT | VK_QUEUE_COMPUTE_BIT; int universalQueueFamily = -1; for (unsigned int i = 0; i < mDeviceInfo.queueFamilies.size(); ++i) { if ((mDeviceInfo.queueFamilies[i].queueFlags & kUniversalFlags) ==