Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor fixes for GLFW Vulkan Demo #619

Merged
merged 2 commits into from
Apr 4, 2024

Conversation

jonpikum
Copy link
Contributor

@jonpikum jonpikum commented Mar 8, 2024

This PR contains changes I needed for the glfw_vulkan demo to function in a reasonable manner (launch + window resizing) on my Void Linux machine.

40a172b - It is valid to continue a render process in the event that vkAcquireNextImageKHR returns VK_SUBOPTIMAL_KHR. The implementation already correctly handles recreating the swapchain when necessary so no other changes were needed beyond preventing the error-out.

03aa308 - Vulkan may create more swapchain images than requested via minImageCount to vkCreateSwapchainKHR. In my testing on two different machines, vkGetSwapchainImagesKHR was returning minImageCount + 1 when queried, causing me to hit this error-out. The demo works without any other changes beyond preventing the error-out.
https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCreateSwapchainKHR.html
https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkSwapchainCreateInfoKHR.html

@m0ppers Since you added Vulkan, can you double-check me on this?

jonpikum added 2 commits March 8, 2024 11:40
The Vulkan spec states that create_info.minImageCount determines
the minimum number of images to create, not the exact count.
The count retrieved via vkGetSwapchainImagesKHR can (and in my
case does) differ - without penalty to the rest of the demo.
@m0ppers
Copy link
Contributor

m0ppers commented Mar 11, 2024

LGTM ✔️

@RobLoach RobLoach changed the title Glfw vulkan demo minor fixes Minor fixes for GLFW Vulkan Demo Apr 4, 2024
@RobLoach RobLoach merged commit d1fa8f7 into Immediate-Mode-UI:master Apr 4, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants