Skip to content
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

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

Merged
merged 2 commits into from
Dec 6, 2023

Conversation

Elabajaba
Copy link
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
27 checks passed
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