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

wgpu: Yeet the copy_srgb shader and pipeline #12720

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

torokati44
Copy link
Member

This workaround won't be needed at all after either we move to wgpu 17.0.0, or gfx-rs/wgpu#3817 gets backported to wgpu 0.16.x.
And even until that, the desktop player is now fine even with OpenGL thanks to the indirect movie rendering through egui.
As for Android, I'm going to temporarily move to a patched wgpu 0.16 with the fix linked above.

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.
@Dinnerbone
Copy link
Contributor

This surely will just make it crash when the format is different, no? 😅

You still gotta tell it to change the srgbness

@torokati44
Copy link
Member Author

torokati44 commented Aug 12, 2023

This surely will just make it crash when the format is different, no? 😅

As in, what format is different from what? 😶 The one we request vs. the one we end up getting?

You still gotta tell it to change the srgbness

And how would I do that? Sorry, I still don't speak wgpu... :|

@Dinnerbone
Copy link
Contributor

If the texture you're copying is srgb but you're copying it to rgb, or vice verca.

When you make the texture view, you can specify that you want it in the same format but with/without srgb - that's how we should do it.

@torokati44
Copy link
Member Author

Aaah, right!
https://gpuweb.github.io/gpuweb/#dom-gputexturedescriptor-viewformats

Two GPUTextureFormats format and viewFormat are texture view format compatible if:

  • format equals viewFormat, or
  • format and viewFormat differ only in whether they are srgb formats (have the -srgb suffix).

This will have to wait though. Unless you want to do it in the meantime...

@torokati44 torokati44 marked this pull request as draft August 19, 2023 20:58
@danielhjacobs danielhjacobs added A-rendering Area: Rendering & Graphics render-wgpu Issues relating to the wgpu renderer T-refactor Type: Refactor / Cleanup labels Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rendering Area: Rendering & Graphics render-wgpu Issues relating to the wgpu renderer T-refactor Type: Refactor / Cleanup
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants