Skip to content

backport #4695 [naga] Let constant evaluation handle Compose of Splat.#4833

Merged
cwfitzgerald merged 2 commits intogfx-rs:v0.18from
Elabajaba:naga_splat_backport
Dec 6, 2023
Merged

backport #4695 [naga] Let constant evaluation handle Compose of Splat.#4833
cwfitzgerald merged 2 commits intogfx-rs:v0.18from
Elabajaba:naga_splat_backport

Conversation

@Elabajaba
Copy link
Copy Markdown
Contributor

@Elabajaba Elabajaba commented Dec 5, 2023

Connections
Backports #4695 to the wgpu 0.18 branch (naga 0.14).

Description
Nested wgsl vec creation (eg. vec3<f32>(vec2<f32>(1.0), 0.0)) spits out vulkan validation errors. This backports the fix for it to naga 0.14 so that devs writing bevy shaders don't have to change shaders to avoid the validation error.

Testing
Examples still seem to run, and it fixed the vulkan validation errors when using eg. vec3<f32>(vec2<f32>(1.0), 0.0).

Checklist

  • Run cargo fmt.
  • Run cargo clippy. If applicable, add:
    • --target wasm32-unknown-unknown
    • --target wasm32-unknown-emscripten
  • Run cargo xtask test to run tests.

cargo xtask validate spv kept failing with [ERROR xtask::result] 'spirv-val' failed to run; exit code: Some(1) despite spirv-val being in my PATH on windows.

  • Add change to CHANGELOG.md. See simple instructions inside file.

Apparently git cherry-pick --no-commit strips the OG commit author, so I redid it and closed the other one.

When consuming a `Compose` expression that constructs a vector,
flatten `Splat` subexpressions out into their components.

Fixes gfx-rs#4581.
@Elabajaba Elabajaba requested a review from a team as a code owner December 5, 2023 20:36
@cwfitzgerald cwfitzgerald merged commit a3b6900 into gfx-rs:v0.18 Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants