Wait for idle queue after submitting an empty job
authorRicardo Garcia <rgarcia@igalia.com>
Tue, 19 Apr 2022 09:53:54 +0000 (11:53 +0200)
committerMatthew Netsch <quic_mnetsch@quicinc.com>
Thu, 5 May 2022 15:50:02 +0000 (15:50 +0000)
The test below imports an external signaled semaphore and submits to the
queue an empty job that waits on that signaled sempahore, but the test
returns without any further wait, which means the external sempahore may
be destroyed before the driver has had a chance to use it.

Affected tests:
dEQP-VK.api.external.semaphore.sync_fd.import_signaled_temporary

Components: Vulkan
VK-GL-CTS issue: 3636

Change-Id: I3e8daa9146f6fd542ad20539a7e9b6c9f0242978

external/vulkancts/modules/vulkan/api/vktApiExternalMemoryTests.cpp

index 61c566c..4bdb091 100644 (file)
@@ -1184,6 +1184,7 @@ tcu::TestStatus testSemaphoreImportSyncFdSignaled (Context&                                               context,
                const vk::Unique<vk::VkSemaphore>       semaphore       (createAndImportSemaphore(vkd, *device, config.externalType, handle, flags));
 
                submitEmptyWait(vkd, queue, *semaphore);
+               VK_CHECK(vkd.queueWaitIdle(queue));
 
                return tcu::TestStatus::pass("Pass");
        }