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

Vulkan: Account for the case surface_capabilities.currentExtent is unset #98852

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

darksylinc
Copy link
Contributor

Wayland in particular sets surface_capabilities.currentExtent.width to the special value 0xFFFFFFFF, which is valid per spec. Fixes #98779

It may also fix misc issues when resizing on all platforms.

Superseedes PR #98780 , thanks to user @tdaven for the original patch. PR #98780 would break Android support as it did not account that width and height might need to be swapped.

Replaced manual swap by Godot's SWAP(), which indicates intention much easier.

Wayland in particular sets surface_capabilities.currentExtent.width to
the special value 0xFFFFFFFF, which is valid per spec.
Fixes godotengine#98779

It may also fix misc issues when resizing on all platforms.

Superseedes PR godotengine#98780 , thanks to user tdaven for the original patch.
PR godotengine#98780 would break Android support as it did not account that width
and height might need to be swapped.

Replaced manual swap by Godot's SWAP(), which indicates intention much
easier.
@tdaven
Copy link
Contributor

tdaven commented Nov 5, 2024

I can confirm this PR fixes #98779. I don't have an android setup so I can't test that behavior. But Fedora 41 Wayland session opens the editor fine with this PR.

Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested successfully on Fedora 41 with both Wayland and X11.

@akien-mga akien-mga changed the title Account for the case surface_capabilities.currentExtent is unset Vulkan: Account for the case surface_capabilities.currentExtent is unset Nov 5, 2024
Copy link
Member

@clayjohn clayjohn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me!

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.

Failure to create swap chain since swappy additions (Linux Wayland).
5 participants