Fix synchronization.cross_instance TEMPORARY permanence
authorRussell Chou <russellc@nvidia.com>
Tue, 4 Oct 2022 21:07:52 +0000 (14:07 -0700)
committerMatthew Netsch <quic_mnetsch@quicinc.com>
Thu, 13 Oct 2022 16:16:20 +0000 (16:16 +0000)
VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT only supports TEMPORARY permanence, so check for that.

Affects:
dEQP-VK.synchronization.cross_instance.*_binary_semaphore_fence_fd
dEQP-VK.synchronization2.cross_instance.*_binary_semaphore_fence_fd

Components: Vulkan Framework
VK-GL-CTS issue: 4021

Change-Id: I6f663cbc35fcd7f81927878f31f78a6aaadf1a74

external/vulkancts/modules/vulkan/synchronization/vktSynchronizationCrossInstanceSharingTests.cpp

index 4facf5f..f5a13d4 100644 (file)
@@ -1166,10 +1166,11 @@ tcu::TestStatus SharingTestInstance::iterate (void)
                        VK_CHECK(synchronizationWrapperA->queueSubmit(queueA, DE_NULL));
 
                        {
-                               NativeHandle    nativeSemaphoreHandle;
+                               NativeHandle                                            nativeSemaphoreHandle;
+                               const vk::VkSemaphoreImportFlags        flags = isSupportedPermanence(m_semaphoreHandleType, PERMANENCE_PERMANENT) ? (vk::VkSemaphoreImportFlagBits)0u : vk::VK_SEMAPHORE_IMPORT_TEMPORARY_BIT;
 
                                getSemaphoreNative(m_vkdA, *m_deviceA, *semaphoreA, m_semaphoreHandleType, nativeSemaphoreHandle);
-                               importSemaphore(m_vkdB, *m_deviceB, *semaphoreB, m_semaphoreHandleType, nativeSemaphoreHandle, 0u);
+                               importSemaphore(m_vkdB, *m_deviceB, *semaphoreB, m_semaphoreHandleType, nativeSemaphoreHandle, flags);
                        }
                }
                {