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-in] Proper singular generic in vec and matrix #6189

Merged

Conversation

sagudev
Copy link
Contributor

@sagudev sagudev commented Sep 1, 2024

Connections
Fixes #4473

Description
next_scalar_generic was replaced with new singular_generic, that only parses into a Type, that is checked for scalar later when we convert it to naga-ir. Probably all next_scalar_generic(_with_span) would needed to be converted similarly to support type aliases.

Testing
Existing test were updated to also test type aliases in matrix/vec generic.

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>
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
IDK

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
@sagudev sagudev force-pushed the proper-singular-generic-in-vec-and-matrix branch from 8882864 to 2b92e0b Compare September 1, 2024 09:16
@sagudev
Copy link
Contributor Author

sagudev commented Sep 2, 2024

Servo's CTS results:

OK /_webgpu/webgpu/cts.https.html?q=webgpu:shader,validation,expression,access,vector:concrete:*

    PASS [expected FAIL] subtest: :vector_decl="const";vector_width=4;element_type="i32"
    PASS [expected FAIL] subtest: :vector_decl="const";vector_width=4;element_type="u32"
    PASS [expected FAIL] subtest: :vector_decl="const";vector_width=4;element_type="f32"
    PASS [expected FAIL] subtest: :vector_decl="const";vector_width=4;element_type="bool"
    PASS [expected FAIL] subtest: :vector_decl="let";vector_width=4;element_type="i32"
    PASS [expected FAIL] subtest: :vector_decl="let";vector_width=4;element_type="u32"
    PASS [expected FAIL] subtest: :vector_decl="let";vector_width=4;element_type="f32"
    PASS [expected FAIL] subtest: :vector_decl="let";vector_width=4;element_type="bool"
    PASS [expected FAIL] subtest: :vector_decl="var";vector_width=4;element_type="i32"
    PASS [expected FAIL] subtest: :vector_decl="var";vector_width=4;element_type="u32"
    And 6 more unexpected results...

OK /_webgpu/webgpu/cts.https.html?q=webgpu:shader,validation,types,alias:match_non_alias:*

    PASS [expected FAIL] subtest: :case="template_param"
    PASS [expected FAIL] subtest: :case="predeclared_alias"

OK /_webgpu/webgpu/cts.https.html?q=webgpu:shader,validation,types,alias:no_indirect_recursion_via_matrix_element:*

    PASS [expected FAIL] subtest: :target="f32"

OK /_webgpu/webgpu/cts.https.html?q=webgpu:shader,validation,types,alias:no_indirect_recursion_via_vector_element:*

    PASS [expected FAIL] subtest: :target="i32"

OK /_webgpu/webgpu/cts.https.html?q=webgpu:shader,validation,types,matrix:valid:*

    PASS [expected FAIL] subtest: :case="alias"

OK /_webgpu/webgpu/cts.https.html?q=webgpu:shader,validation,types,vector:vector:*

    PASS [expected FAIL] subtest: :case="aliased_el_ty"

@sagudev sagudev marked this pull request as ready for review September 2, 2024 04:51
@sagudev sagudev requested a review from a team as a code owner September 2, 2024 04:51
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.

Good stuff! Thanks!

@teoxoy teoxoy merged commit 105cb9d into gfx-rs:trunk Sep 2, 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.

Type parameters to vec/mat type constructors can't be aliases
2 participants