Skip to content

Commit

Permalink
Wait semaphores for VkQueuePresentKHR
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
hliatis committed Mar 12, 2019
1 parent 43be716 commit 914a46d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Vulkan/VkQueue.cpp
Expand Up @@ -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]);
Expand Down

0 comments on commit 914a46d

Please sign in to comment.