From 7a4c3f5108d85f9a84ff703485a743a9c6b58a21 Mon Sep 17 00:00:00 2001 From: Matthew Netsch Date: Wed, 2 Sep 2020 13:09:15 -0400 Subject: [PATCH] Fixes timeline sempahore queue flags Components: Vulkan VK-GL-CTS Issue: 2571 Affects: dEQP-VK.synchronization.signal_order.timeline_semaphore.* Change-Id: Ibba5d7ac7279cb87a53433ef4c04b57050629efb --- .../synchronization/vktSynchronizationSignalOrderTests.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationSignalOrderTests.cpp b/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationSignalOrderTests.cpp index 0d95a19..3e28636 100644 --- a/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationSignalOrderTests.cpp +++ b/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationSignalOrderTests.cpp @@ -1279,8 +1279,12 @@ public: !context.getTimelineSemaphoreFeatures().timelineSemaphore) TCU_THROW(NotSupportedError, "Timeline semaphore not supported"); + VkQueueFlags writeOpQueueFlags = m_writeOpSupport->getQueueFlags(*m_operationContext); for (deUint32 familyIdx = 0; familyIdx < queueFamilyProperties.size(); familyIdx++) { - if ((queueFamilyProperties[familyIdx].queueFlags & m_writeOpSupport->getQueueFlags(*m_operationContext)) == m_writeOpSupport->getQueueFlags(*m_operationContext)) { + if (((queueFamilyProperties[familyIdx].queueFlags & writeOpQueueFlags) == writeOpQueueFlags) || + ((writeOpQueueFlags == VK_QUEUE_TRANSFER_BIT) && + (((queueFamilyProperties[familyIdx].queueFlags & VK_QUEUE_GRAPHICS_BIT) == VK_QUEUE_GRAPHICS_BIT) || + ((queueFamilyProperties[familyIdx].queueFlags & VK_QUEUE_COMPUTE_BIT) == VK_QUEUE_COMPUTE_BIT)))) { m_queueA = getDeviceQueue(m_deviceInterface, *m_device, familyIdx, 0); m_queueFamilyIndexA = familyIdx; break; @@ -1289,8 +1293,12 @@ public: if (m_queueA == DE_NULL) TCU_THROW(NotSupportedError, "No queue supporting write operation"); + VkQueueFlags readOpQueueFlags = m_readOpSupport->getQueueFlags(*m_operationContext); for (deUint32 familyIdx = 0; familyIdx < queueFamilyProperties.size(); familyIdx++) { - if ((queueFamilyProperties[familyIdx].queueFlags & m_readOpSupport->getQueueFlags(*m_operationContext)) == m_readOpSupport->getQueueFlags(*m_operationContext)) { + if (((queueFamilyProperties[familyIdx].queueFlags & readOpQueueFlags) == readOpQueueFlags) || + ((readOpQueueFlags == VK_QUEUE_TRANSFER_BIT) && + (((queueFamilyProperties[familyIdx].queueFlags & VK_QUEUE_GRAPHICS_BIT) == VK_QUEUE_GRAPHICS_BIT) || + ((queueFamilyProperties[familyIdx].queueFlags & VK_QUEUE_COMPUTE_BIT) == VK_QUEUE_COMPUTE_BIT)))) { for (deUint32 queueIdx = 0; queueIdx < queueFamilyProperties[familyIdx].queueCount; queueIdx++) { VkQueue queue = getDeviceQueue(m_deviceInterface, *m_device, familyIdx, queueIdx); -- 2.7.4