From 02d3809cf3155d78e910bfadfa367682fe9ce05d Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Fri, 20 Apr 2018 20:07:57 -0700 Subject: Added comments --- Graphics/GraphicsEngineVulkan/src/SwapChainVkImpl.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Graphics/GraphicsEngineVulkan') 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; -- cgit v1.2.3