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

Chose format from supported ones that we support #47640

Merged
merged 1 commit into from
Apr 5, 2021

Conversation

BastiaanOlij
Copy link
Contributor

Check the available formats against formats we support to choose the first match. Basically we want to skip sRGB formats as we're doing the linear -> sRGB color correction ourselves. sRGB formats will do a hardware conversion which doubles this and causes the screen to look washed out.

We may wish to add more supported formats.

This may fix #47585

@BastiaanOlij BastiaanOlij requested a review from reduz April 5, 2021 11:29
@BastiaanOlij BastiaanOlij self-assigned this Apr 5, 2021
@BastiaanOlij BastiaanOlij requested a review from a team as a code owner April 5, 2021 11:29
@BastiaanOlij BastiaanOlij force-pushed the fix_vulkan_format branch 2 times, most recently from 9d64d47 to d06829a Compare April 5, 2021 11:34
@BastiaanOlij
Copy link
Contributor Author

BastiaanOlij commented Apr 5, 2021

Note that besides adding more formats to the supported formats list we may wish to order this list from the formats we wish to use and swap the two for loops around. This way we determine priority, not the Vulkan driver which may turn out to just return the list in value order.

edit I'm going to swap the order, hang on

@akien-mga
Copy link
Member

This may fix #47585

I confirm that this fixes the issue for me with both Intel HD 630 and Radeon RX Vega M running on Mesa 21.1.

@akien-mga akien-mga added this to the 4.0 milestone Apr 5, 2021
@BastiaanOlij
Copy link
Contributor Author

One footnote after discussions with Reduz, we expect most if not all GPUs support VK_FORMAT_B8G8R8A8_UNORM so that will likely be selected by default.

If VK_FORMAT_R8G8B8A8_UNORM ends up being selected there may be other changes that are required. We'll need to deal with that when someone runs into it.

Same if someone runs into No usable surface format found. we'll need to investigate which formats are supported on that device and see if we can add it to the allowed_formats list.

@akien-mga akien-mga merged commit 9e8acb3 into godotengine:master Apr 5, 2021
@akien-mga
Copy link
Member

Thanks!

@BastiaanOlij BastiaanOlij deleted the fix_vulkan_format branch April 5, 2021 13:27
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.

Vulkan: Editor appears "washed out" or "white-ish" (Mesa drivers)
3 participants