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

[naga wgsl] all swizzle components must be either color or dimension #6187

Merged
merged 3 commits into from
Aug 31, 2024

Conversation

sagudev
Copy link
Contributor

@sagudev sagudev commented Aug 31, 2024

Connections
fixes #6184

Description
Added check that all swizzle components are either dimension (xyzw) or color (rgba).

Testing
There is new test and I will do CTS run in servo.

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.
  • Add change to CHANGELOG.md. See simple instructions inside file.

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
@sagudev sagudev changed the title [naga wgsl] [naga wgsl] all swizzle components must be either color or dimension Aug 31, 2024
@sagudev
Copy link
Contributor Author

sagudev commented Aug 31, 2024

CTS run in servo:

OK /_webgpu/webgpu/cts.https.html?q=webgpu:shader,validation,expression,access,vector:abstract:*
   PASS [expected FAIL] subtest: :vector_width=2;abstract_type="int";concrete_type="i32"
   PASS [expected FAIL] subtest: :vector_width=2;abstract_type="float";concrete_type="u32"
   PASS [expected FAIL] subtest: :vector_width=2;abstract_type="float";concrete_type="i32"
   PASS [expected FAIL] subtest: :vector_width=2;abstract_type="float";concrete_type="f32"
   PASS [expected FAIL] subtest: :vector_width=3;abstract_type="int";concrete_type="i32"
   PASS [expected FAIL] subtest: :vector_width=3;abstract_type="float";concrete_type="u32"
   PASS [expected FAIL] subtest: :vector_width=3;abstract_type="float";concrete_type="i32"
   PASS [expected FAIL] subtest: :vector_width=3;abstract_type="float";concrete_type="f32"
   PASS [expected FAIL] subtest: :vector_width=4;abstract_type="int";concrete_type="i32"
   PASS [expected FAIL] subtest: :vector_width=4;abstract_type="float";concrete_type="u32"
   PASS [expected FAIL] subtest: :vector_width=4;abstract_type="float";concrete_type="i32"
   PASS [expected FAIL] subtest: :vector_width=4;abstract_type="float";concrete_type="f32"

@sagudev sagudev marked this pull request as ready for review August 31, 2024 09:06
@sagudev sagudev requested a review from a team as a code owner August 31, 2024 09:06
Copy link
Member

@teoxoy teoxoy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@teoxoy teoxoy merged commit 585f4a1 into gfx-rs:trunk Aug 31, 2024
25 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.

WGSL: xyzw and rgba are not allowed to apear in same swizzle
2 participants