Make rectangle_fs.wgsl compile on chrome despite angle/mesa bug (#3931)#5074
Make rectangle_fs.wgsl compile on chrome despite angle/mesa bug (#3931)#5074
rectangle_fs.wgsl compile on chrome despite angle/mesa bug (#3931)#5074Conversation
2c1a9ec to
22bb6ab
Compare
886ab7e to
b88fe6d
Compare
emilk
left a comment
There was a problem hiding this comment.
So sad that this is necessary, but the resulting code is not all bad, so 👍
| /// Loads an RGBA texel from a texture holding an NV12 encoded image at the given screen space coordinates. | ||
| fn decode_nv12(texture: texture_2d<u32>, coords: vec2i) -> vec4f { | ||
| /// Loads an RGBA texel from a texture holding an NV12 or YUY2 encoded image at the given screen space coordinates. | ||
| fn decode_nv12_or_yuy2(sample_type: u32, texture: texture_2d<u32>, coords: vec2i) -> vec4f { |
There was a problem hiding this comment.
it surprises me that combining these two into one function did much difference
There was a problem hiding this comment.
Yeah -- this was the final tweak that got things to work :-(
Wumpf
left a comment
There was a problem hiding this comment.
what Emil said. Disastrous but will do - you once again managed to not regress us, but we won't be able to hold this up for much longer.
We did not report this so far since we weren't able to break this down well enough - when building an application from javascript that uses the translated glsl shader everything works. But we have to get to the bottom of this
| let y = f32(textureLoad(texture, vec2u(coords), 0).r); | ||
| let u = f32(textureLoad(texture, vec2u(u32(uv_col), uv_offset + uv_row), 0).r); | ||
| let v = f32(textureLoad(texture, vec2u((u32(uv_col) + 1u), uv_offset + uv_row), 0).r); | ||
| // WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! |
There was a problem hiding this comment.
are you sure these are enough WARNING!? 😆
|
Let's make sure we test this new shader properly before merging! |
Confirmed both nv12/yuy2 working on both native and web. |
Size changes
|
rectangle_fs.wgsl compile on chrome despite angle/mesa bug (#3931)
What
When we added support for YUY2 format in (#4877) we we re-triggered the issue originally originally reported in #3931 and now #5073
Checklist
mainbuild: app.rerun.ionightlybuild: app.rerun.io