[naga] Let constant evaluation handle Compose of Splat.#4695
Merged
teoxoy merged 1 commit intogfx-rs:trunkfrom Nov 16, 2023
Merged
[naga] Let constant evaluation handle Compose of Splat.#4695teoxoy merged 1 commit intogfx-rs:trunkfrom
Compose of Splat.#4695teoxoy merged 1 commit intogfx-rs:trunkfrom
Conversation
217c451 to
146c43b
Compare
When consuming a `Compose` expression that constructs a vector, flatten `Splat` subexpressions out into their components. Fixes gfx-rs#4581.
146c43b to
a6a3143
Compare
Member
cwfitzgerald
left a comment
There was a problem hiding this comment.
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))?
Member
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. |
teoxoy
approved these changes
Nov 16, 2023
Member
teoxoy
left a comment
There was a problem hiding this comment.
Looks good, thanks for looking into it!
This was referenced Nov 29, 2023
cwfitzgerald
pushed a commit
that referenced
this pull request
Dec 6, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When consuming a
Composeexpression that constructs a vector, flattenSplatsubexpressions out into their components.Fixes #4581.
cc @cwfitzgerald
Checklist
cargo clippy.cargo clippy --target wasm32-unknown-unknownif applicable.