diff --git a/src/vk.cpp b/src/vk.cpp index 98a131e..a47d13a 100644 --- a/src/vk.cpp +++ b/src/vk.cpp @@ -1065,4 +1065,17 @@ void Vulkan::renderFrame() } currentFrame = (currentFrame + 1) % surface.imageCount; + + VkPresentInfoKHR presentInfo{}; + presentInfo.sType = VK_STRUCTURE_TYPE_PRESENT_INFO_KHR; + presentInfo.waitSemaphoreCount = 1; + presentInfo.pWaitSemaphores = signalSemaphores; + presentInfo.swapchainCount = 1; + presentInfo.pSwapchains = &swapChain; + presentInfo.pImageIndices = &imageIndex; + + if (vkQueuePresentKHR(queue.descriptor, &presentInfo) != VK_SUCCESS) + { + throw std::runtime_error("Unable to present swap chain image"); + } }