Clamp swapchain dimensions to fix window scaling on X11 #205
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previously, when I tried to resize the swapchain on X11 with 125% window scale, the app would crash with this error:
Interestingly this only happens if I try resizing by dragging one of the window corners: if I doubleclick on the window decoration to fullscreen it, it works fine.
With this fix, the app will just print tons of warnings instead of crashing, resizing works fine:
This is kind of a dirty fix, but I really have no other idea how to prevent this. Could it be an incorrect configuration of
VkSwapchainPresentScalingCreateInfoEXT? It could also be an issue of XWayland or the Linux AMD drivers...