You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -912,7 +915,7 @@ class VulkanExample : public VulkanExampleBase
912
915
// Get the next swap chain image from the implementation
913
916
// Note that the implementation is free to return the images in any order, so we must use the acquire function and can't just cycle through the images/imageIndex on our own
914
917
uint32_t imageIndex;
915
-
VkResult result = vkAcquireNextImageKHR(device, swapChain.swapChain, UINT64_MAX, presentCompleteSemaphores[currentFrame], VK_NULL_HANDLE, &imageIndex);
918
+
VkResult result = vkAcquireNextImageKHR(device, swapChain.swapChain, UINT64_MAX, presentCompleteSemaphores[currentSemaphore], VK_NULL_HANDLE, &imageIndex);
916
919
if (result == VK_ERROR_OUT_OF_DATE_KHR) {
917
920
windowResize();
918
921
return;
@@ -1008,10 +1011,10 @@ class VulkanExample : public VulkanExampleBase
1008
1011
submitInfo.commandBufferCount = 1; // We submit a single command buffer
1009
1012
1010
1013
// Semaphore to wait upon before the submitted command buffer starts executing
// Command buffers are used to record commands to and are submitted to a queue for execution ("rendering")
@@ -689,8 +700,8 @@ class VulkanExample : public VulkanExampleBase
689
700
690
701
// Get the next swap chain image from the implementation
691
702
// Note that the implementation is free to return the images in any order, so we must use the acquire function and can't just cycle through the images/imageIndex on our own
692
-
uint32_t imageIndex;
693
-
VkResult result = vkAcquireNextImageKHR(device, swapChain.swapChain, UINT64_MAX, presentCompleteSemaphores[currentFrame], VK_NULL_HANDLE, &imageIndex);
703
+
uint32_t imageIndex{ 0 };
704
+
VkResult result = vkAcquireNextImageKHR(device, swapChain.swapChain, UINT64_MAX, presentCompleteSemaphores[currentSemaphore], VK_NULL_HANDLE, &imageIndex);
694
705
if (result == VK_ERROR_OUT_OF_DATE_KHR) {
695
706
windowResize();
696
707
return;
@@ -777,10 +788,10 @@ class VulkanExample : public VulkanExampleBase
777
788
submitInfo.commandBufferCount = 1; // We submit a single command buffer
778
789
779
790
// Semaphore to wait upon before the submitted command buffer starts executing
0 commit comments