Skip to content

Conversation

@andyleiserson
Copy link
Contributor

@andyleiserson andyleiserson commented Jan 14, 2026

Somewhat a follow-up to #8741. Fixes #4720, and fixes the test cases in #7393, but not the issue itself.

After studying the spec more and the related CTS test cases, I think the necessary zero-value validation can be simplified to "type must be constructible". So this changes the zero-value validation from #8741 to operate that way.

Also adds other validation in the WGSL front-end for non-constructible types in places they are not permitted.

This change is adjacent to the template-list discovery change (#8386), and may have some conflicts, but as best I could tell the two changes don't directly overlap.

Testing
Enables CTS tests and adds naga wgsl_errors and validation tests.

Squash or Rebase? Squash

Checklist

  • Run cargo fmt.
  • Run taplo format.
  • Run cargo clippy --tests. If applicable, add:
    • --target wasm32-unknown-unknown
  • Run cargo xtask test to run tests.
  • Need to add a CHANGELOG.md entry.

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.

Naga validation doesn't check that Expression::ZeroValue is only applied to suitable types

1 participant