OSDN Git Service

Wait semaphores for VkQueuePresentKHR
authorHernan Liatis <hliatis@google.com>
Tue, 12 Mar 2019 18:34:24 +0000 (11:34 -0700)
committerHernan Liatis <hliatis@google.com>
Tue, 12 Mar 2019 20:40:02 +0000 (20:40 +0000)
Bug: b/124265819
Change-Id: I7c84c3be8fb13a4ef798f90b8c610ebeafa82b5c
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/26970
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Tested-by: Hernan Liatis <hliatis@google.com>
src/Vulkan/VkQueue.cpp

index 339eeed..fcec019 100644 (file)
@@ -76,6 +76,11 @@ void Queue::waitIdle()
 
 void Queue::present(const VkPresentInfoKHR* presentInfo)
 {
+       for(uint32_t i = 0; i < presentInfo->waitSemaphoreCount; i++)
+       {
+               vk::Cast(presentInfo->pWaitSemaphores[i])->wait();
+       }
+
        for(uint32_t i = 0; i < presentInfo->swapchainCount; i++)
        {
                vk::Cast(presentInfo->pSwapchains[i])->present(presentInfo->pImageIndices[i]);