Skip to content

Conversation

@sudonatalie
Copy link
Contributor

Add some initial valid swizzle assignment tests on basic var vectors.

These tests pass on my current WIP implementation of the feature locally.

Issue: #4579


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.

@github-actions
Copy link

github-actions bot commented Jan 30, 2026

Results for build job (at 5bc7e84):

+webgpu:shader,execution,statement,swizzle_assignment:swizzle_assignment_local_var:* - 13 cases, 13 subcases (~1/case)
+webgpu:shader,execution,statement,swizzle_assignment:swizzle_assignment_other_vars:* - 1 cases, 1 subcases (~1/case)
+webgpu:shader,execution,statement,swizzle_assignment:swizzle_assignment_chained:* - 1 cases, 1 subcases (~1/case)
+webgpu:shader,execution,statement,swizzle_assignment:swizzle_assignment_pointer:* - 1 cases, 1 subcases (~1/case)
+webgpu:shader,execution,statement,swizzle_assignment:swizzle_compound_assignment:* - 1 cases, 1 subcases (~1/case)
-webgpu:shader,validation,parse,requires:wgsl_matches_api:* - 8 cases, 8 subcases (~1/case)
+webgpu:shader,validation,parse,requires:wgsl_matches_api:* - 9 cases, 9 subcases (~1/case)
-TOTAL: 285935 cases, 2344828 subcases
+TOTAL: 285953 cases, 2344846 subcases

@sudonatalie sudonatalie force-pushed the swizzle-assign branch 2 times, most recently from b95f0b5 to 8ef7fcf Compare January 30, 2026 20:44
Copy link
Contributor

@alan-baker alan-baker left a comment

Choose a reason for hiding this comment

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

Can you add TODOs or unimplemented test suites for the following:

  • Other address spaces (only function is tested currently)
  • Chained swizzles
  • Pointer to swizzle

@sudonatalie
Copy link
Contributor Author

Can you add TODOs or unimplemented test suites for the following:

  • Other address spaces (only function is tested currently)
  • Chained swizzles
  • Pointer to swizzle

Done and updated tracking bug

@sudonatalie
Copy link
Contributor Author

Fixed TODOs to make the linter happy and a placeholder validation test file

@sudonatalie
Copy link
Contributor Author

Fixed TODOs to make the linter happy and a placeholder validation test file

Generators didn't seem to like an empty test file so removed that, still tracking need for validation tests in Issue #4579

@sudonatalie sudonatalie enabled auto-merge (squash) February 2, 2026 19:44
@sudonatalie sudonatalie merged commit 5cfc580 into gpuweb:main Feb 3, 2026
1 of 2 checks passed
@sudonatalie sudonatalie deleted the swizzle-assign branch February 3, 2026 01:07
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