-
Notifications
You must be signed in to change notification settings - Fork 366
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
Make rectangle_fs.wgsl
compile on chrome despite angle/mesa bug (#3931)
#5074
Conversation
2c1a9ec
to
22bb6ab
Compare
886ab7e
to
b88fe6d
Compare
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it surprises me that combining these two into one function did much difference
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.
Yeah -- this was the final tweak that got things to work :-(
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
main
build: app.rerun.ionightly
build: app.rerun.io