Skip to content

Fix Vulkan example hang - #9497

Open
Nemirtingas wants to merge 1 commit into
ocornut:masterfrom
Nemirtingas:fix/windows-vulkan-example-hang
Open

Fix Vulkan example hang#9497
Nemirtingas wants to merge 1 commit into
ocornut:masterfrom
Nemirtingas:fix/windows-vulkan-example-hang

Conversation

@Nemirtingas

@Nemirtingas Nemirtingas commented Aug 1, 2026

Copy link
Copy Markdown

When vkQueuePresentKHR or vkAcquireNextImageKHR return VK_SUBOPTIMAL_KHR, FramePresent will not be called because of

https://github.com/ocornut/imgui/blob/v1.92.9/examples/example_win32_vulkan/main.cpp#L321-L322

Making vkQueuePresentKHR never called and never releasing the current frame, hanging the app because g_SwapChainRebuild is currently only released in the WM_SIZE message https://github.com/ocornut/imgui/blob/v1.92.9/examples/example_win32_vulkan/main.cpp#L546-L560

When vkQueuePresentKHR or vkAcquireNextImageKHR return VK_SUBOPTIMAL_KHR, FramePresent will not be called because of

    if (g_SwapChainRebuild)
        return;

Making vkQueuePresentKHR never called and never releasing the current frame, hanging the app.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants