-
Notifications
You must be signed in to change notification settings - Fork 927
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
[naga] Let constant evaluation handle Compose
of Splat
.
#4695
Conversation
217c451
to
146c43b
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.
Nice!
When consuming a `Compose` expression that constructs a vector, flatten `Splat` subexpressions out into their components. Fixes gfx-rs#4581.
146c43b
to
a6a3143
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.
Thinking out loud: will this code still have issues when spirv/glsl in is presented with a complex matrix splat (like mat3(vec4, float, vec4)
)?
The GLSL frontend will take care of the desugaring, so I think it should work fine. wgpu/naga/src/front/glsl/functions.rs Line 422 in acaeb8d
SPIR-V doesn't support those complex compose expressions as far as I know. |
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.
Looks good, thanks for looking into it!
#4833) Co-authored-by: Jim Blandy <[email protected]> Fixes #4581.
When consuming a
Compose
expression that constructs a vector, flattenSplat
subexpressions out into their components.Fixes #4581.
cc @cwfitzgerald
Checklist
cargo clippy
.cargo clippy --target wasm32-unknown-unknown
if applicable.