diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2018-04-21 03:07:57 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2018-04-21 03:07:57 +0000 |
| commit | 02d3809cf3155d78e910bfadfa367682fe9ce05d (patch) | |
| tree | b5ee9a5f3a23f1f8dc9275602e4acfa62fbd3413 /Graphics/GraphicsEngineVulkan | |
| parent | Fixed issues with the swap chain resize in Vulkan (diff) | |
| download | DiligentCore-02d3809cf3155d78e910bfadfa367682fe9ce05d.tar.gz DiligentCore-02d3809cf3155d78e910bfadfa367682fe9ce05d.zip | |
Added comments
Diffstat (limited to 'Graphics/GraphicsEngineVulkan')
| -rw-r--r-- | Graphics/GraphicsEngineVulkan/src/SwapChainVkImpl.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Graphics/GraphicsEngineVulkan/src/SwapChainVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/SwapChainVkImpl.cpp index 12e64cd4..58915275 100644 --- a/Graphics/GraphicsEngineVulkan/src/SwapChainVkImpl.cpp +++ b/Graphics/GraphicsEngineVulkan/src/SwapChainVkImpl.cpp @@ -400,6 +400,7 @@ void SwapChainVkImpl::AcquireNextImage(DeviceContextVkImpl *pDeviceCtxVk) VERIFY(res == VK_SUCCESS, "Failed to acquire next swap chain image"); // Next command in the device context must wait for the next image to be acquired + // Unlike fences or events, the act of waiting for a semaphore also unsignals that semaphore (6.4.2) pDeviceCtxVk->AddWaitSemaphore(m_ImageAcquiredSemaphores[m_SemaphoreIndex], VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT); } @@ -427,6 +428,7 @@ void SwapChainVkImpl::Present(Uint32 SyncInterval) PresentInfo.sType = VK_STRUCTURE_TYPE_PRESENT_INFO_KHR; PresentInfo.pNext = nullptr; PresentInfo.waitSemaphoreCount = 1; + // Unlike fences or events, the act of waiting for a semaphore also unsignals that semaphore (6.4.2) VkSemaphore WaitSemaphore[] = { m_DrawCompleteSemaphores[m_SemaphoreIndex] }; PresentInfo.pWaitSemaphores = WaitSemaphore; PresentInfo.swapchainCount = 1; |
