fix bug when queue failed to get image the fence was never reset

This commit is contained in:
Greg Wells
2025-07-16 18:47:44 -04:00
parent b84786715d
commit b754e5b84b

View File

@@ -93,9 +93,9 @@ gnReturnCode getVulkanPresentQueueImage(gnPresentationQueueHandle presentationQu
presentationQueue->outputDevice->outputDevice->device, presentationQueue->outputDevice->outputDevice->device,
presentationQueue->presentationQueue->swapChain, presentationQueue->presentationQueue->swapChain,
UINT64_MAX, VK_NULL_HANDLE, presentationQueue->outputDevice->outputDevice->barrierFence, imageIndex); UINT64_MAX, VK_NULL_HANDLE, presentationQueue->outputDevice->outputDevice->barrierFence, imageIndex);
vkWaitForFences(presentationQueue->outputDevice->outputDevice->device, 1, &presentationQueue->outputDevice->outputDevice->barrierFence, VK_TRUE, UINT64_MAX);
if (result == VK_ERROR_OUT_OF_DATE_KHR) return GN_OUT_OF_DATE_PRESENTATION_QUEUE; if (result == VK_ERROR_OUT_OF_DATE_KHR) return GN_OUT_OF_DATE_PRESENTATION_QUEUE;
if (result == VK_SUBOPTIMAL_KHR) return GN_SUBOPTIMAL_PRESENTATION_QUEUE; if (result == VK_SUBOPTIMAL_KHR) return GN_SUBOPTIMAL_PRESENTATION_QUEUE;
vkWaitForFences(presentationQueue->outputDevice->outputDevice->device, 1, &presentationQueue->outputDevice->outputDevice->barrierFence, VK_TRUE, UINT64_MAX);
return GN_SUCCESS; return GN_SUCCESS;
} }