Skip to content

Conversation

@sudonatalie
Copy link
Contributor

@sudonatalie sudonatalie commented Jan 20, 2026

Single element swizzle assignment currently fails in Tint when the object of the swizzle is also a swizzle (i.e. v.xy.x = 1.0). This appears to be a valid assignment which should be covered by CTS so added it here. Since there didn't seem to be an existing validation test for simple assignment statements, I created a new file with a couple other simple tests. As multi-element swizzle assignment is not yet part of the spec, also added a test to check that it fails.


Requirements for PR author:

  • All missing test coverage is tracked with "TODO" or .unimplemented().
  • New helpers are /** documented */ and new helper files are found in helper_index.txt.
  • Test behaves as expected in a WebGPU implementation. (If not passing, explain above.)
  • Test have be tested with compatibility mode validation enabled and behave as expected. (If not passing, explain above.)

Requirements for reviewer sign-off:

  • Tests are properly located.
  • Test descriptions are accurate and complete.
  • Tests provide complete coverage (including validation control cases). Missing coverage MUST be covered by TODOs.
  • Tests avoid over-parameterization (see case count report).

When landing this PR, be sure to make any necessary issue status updates.

@sudonatalie sudonatalie requested a review from dj2 January 20, 2026 18:23
@github-actions
Copy link

github-actions bot commented Jan 20, 2026

Results for build job (at 113679a):

+webgpu:shader,validation,decl,assignment_statement:scalar_assignment:* - 1 cases, 1 subcases (~1/case)
+webgpu:shader,validation,decl,assignment_statement:vector_full_assignment:* - 1 cases, 1 subcases (~1/case)
+webgpu:shader,validation,decl,assignment_statement:vector_indexed_assignment:* - 1 cases, 1 subcases (~1/case)
+webgpu:shader,validation,decl,assignment_statement:vector_swizzle_assignment:* - 3 cases, 3 subcases (~1/case)
-TOTAL: 285738 cases, 2344462 subcases
+TOTAL: 285744 cases, 2344468 subcases

Only the single element sizzle assignment on a vector should pass. Check that some other cases continue to fail as expected. To add this test case I created a new file with a couple other simple tests since there didn't seem to be an existing validation test for simple assignment statements.
@sudonatalie sudonatalie force-pushed the swizzle-swizzle-assign branch from 8ec2ab1 to 113679a Compare January 20, 2026 19:48
@sudonatalie
Copy link
Contributor Author

Changed as discussed so v.xy.x = 1.0 fails and switched to a bit of parametrization to neaten that up now that there's multiple failure cases.

@sudonatalie sudonatalie merged commit 01b814e into gpuweb:main Jan 20, 2026
1 check passed
@sudonatalie sudonatalie deleted the swizzle-swizzle-assign branch January 20, 2026 20:15
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.

2 participants