-
Notifications
You must be signed in to change notification settings - Fork 953
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
GLES: on EGL, respect the user requesting a non-sRGB surface format #3817
GLES: on EGL, respect the user requesting a non-sRGB surface format #3817
Conversation
What used to happen was that sRGB was used whether you requested it or not. This commit fixes that and now passing in a non-sRGB texture format in SurfaceConfiguration will result in a non-sRGB surface being created.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this!
Haven't tested it myself but looks good to me. Regarding automated testing, I think we can let it slide for this one - it's usually super tricky to read the actual surface back (which is why all tests that need to reason about render output read back a different target) making this fairly hard to test.
Would it be possible to backport this fix to the 0.16 series please? |
…fx-rs#3817) * EGL: respect the user requesting a non-sRGB surface format What used to happen was that sRGB was used whether you requested it or not. This commit fixes that and now passing in a non-sRGB texture format in SurfaceConfiguration will result in a non-sRGB surface being created. * add changelog entry about the EGL non-sRGB support change
This was a workaround for the issue properly fixed by gfx-rs/wgpu#3817. That fix is in wgpu 0.17.0, and soon we can migrate to that. Even until then, with egui and rendering via MovieView, this is no longer causing problems with the desktop player, even using OpenGL.
Any particular project that's blocking you? Historically we haven't done much backporting after a major release, but I don't think it's off the table :) |
I have since pushed this to v0.16 in my fork, and switched to that in the project where this was important.
One of them was The more important is |
Checklist
cargo clippy
.RunRUSTFLAGS=--cfg=web_sys_unstable_apis cargo clippy --target wasm32-unknown-unknown
if applicable.Description
What used to happen was that sRGB was used whether you requested it or not. This PR fixes that and now passing in a non-sRGB texture format in
SurfaceConfiguration
will result in a non-sRGB surface being created.Testing
To test this, compare a surface configured with the first available non-sRGB format to a surface configured with the first available sRGB format on the OpenGL/EGL backend:
(First time contribution here, not sure if/how I should write an integration test for this?)