Fix waitSemaphoreCount value in signal ordering tests
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Wed, 16 Oct 2019 18:39:50 +0000 (21:39 +0300)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Tue, 22 Oct 2019 16:59:01 +0000 (12:59 -0400)
VK-GL-CTS Issue: 2059
Components: Vulkan
Affects: dEQP-VK.synchronization.signal_order.*timeline_semaphore.*

Change-Id: I25b86f1ae2b8e3650e061f9f2e345147c01419c6

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

index b5bb3b5..6ab78aa 100644 (file)
@@ -749,7 +749,10 @@ public:
                        addSemaphore(vkB, *deviceB, semaphoresB, semaphoreHandlesB, timelineValuesB, false, timelineValuesA.back());
                }
 
-               // Submit writes, each in its own VkSubmitInfo.
+               // Submit writes, each in its own VkSubmitInfo. With binary
+               // semaphores, submission don't wait on anything, with
+               // timeline semaphores, submissions wait on a host signal
+               // operation done below.
                {
                        std::vector<VkTimelineSemaphoreSubmitInfoKHR>   timelineSubmitInfos;
                        std::vector<VkSubmitInfo>                                               submitInfos;
@@ -764,7 +767,8 @@ public:
                                {
                                        VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO_KHR,   // VkStructureType      sType;
                                        DE_NULL,                                                                                                // const void*          pNext;
-                                       iterIdx == 0 ? 1u: 0,                                                                   // deUint32                     waitSemaphoreValueCount
+                                       m_semaphoreType == VK_SEMAPHORE_TYPE_TIMELINE_KHR ?
+                                       1u: 0,                                                                                                  // deUint32                     waitSemaphoreValueCount
                                        &waitValue,                                                                                             // const deUint64*      pWaitSemaphoreValues
                                        1u,                                                                                                             // deUint32                     signalSemaphoreValueCount
                                        &timelineValuesA[iterIdx],                                                              // const deUint64*      pSignalSemaphoreValues
@@ -1384,7 +1388,10 @@ public:
 
                addSemaphore(vk, device, semaphoresB, semaphoreHandlesB, timelineValuesB, timelineValuesA.back());
 
-               // Submit writes, each in its own VkSubmitInfo.
+               // Submit writes, each in its own VkSubmitInfo. With binary
+               // semaphores, submission don't wait on anything, with
+               // timeline semaphores, submissions wait on a host signal
+               // operation done below.
                {
                        std::vector<VkTimelineSemaphoreSubmitInfoKHR>   timelineSubmitInfos;
                        std::vector<VkSubmitInfo>                                               submitInfos;
@@ -1399,7 +1406,8 @@ public:
                                {
                                        VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO_KHR,   // VkStructureType      sType;
                                        DE_NULL,                                                                                                // const void*          pNext;
-                                       iterIdx == 0 ? 1u: 0,                                                                   // deUint32                     waitSemaphoreValueCount
+                                       m_semaphoreType == VK_SEMAPHORE_TYPE_TIMELINE_KHR ?
+                                       1u : 0u,                                                                                                // deUint32                     waitSemaphoreValueCount
                                        &waitValue,                                                                                             // const deUint64*      pWaitSemaphoreValues
                                        1u,                                                                                                             // deUint32                     signalSemaphoreValueCount
                                        &timelineValuesA[iterIdx],                                                              // const deUint64*      pSignalSemaphoreValues