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 <digit@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Corentin Wallez 2019-11-28 09:42:24 +00:00 committed by Commit Bot service account
parent 673146475f
commit 1e2c2f2af3

View File

@ -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) ==