Skip to content

Add chained swizzle assignment tests - #4688

Merged
alan-baker merged 1 commit into
gpuweb:mainfrom
sudonatalie:swizzle-assign-deduplicate
Jul 29, 2026
Merged

Add chained swizzle assignment tests#4688
alan-baker merged 1 commit into
gpuweb:mainfrom
sudonatalie:swizzle-assign-deduplicate

Conversation

@sudonatalie

Copy link
Copy Markdown
Contributor

Add validation and execution tests for chained swizzles on the LHS of an assignment. These are valid with the swizzle_assignment language feature as long as the final indices actually assigned are free from duplicate targets.

These have been tested against the Dawn implementation in: https://dawn-review.googlesource.com/c/dawn/+/327796


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.

Add validation and execution tests for chained swizzles on the LHS of an
assignment. These are valid with the swizzle_assignment language feature
as long as the final indices actually assigned are free from duplicate
targets.

Bug: crbug.com/539634915
@sudonatalie
sudonatalie requested a review from alan-baker July 28, 2026 17:00
@github-actions

Copy link
Copy Markdown

Results for build job (at b697f76):

-webgpu:shader,execution,statement,swizzle_assignment:swizzle_assignment_vars:* - 21 cases, 168 subcases (~8/case)
+webgpu:shader,execution,statement,swizzle_assignment:swizzle_assignment_vars:* - 23 cases, 184 subcases (~8/case)
+webgpu:shader,validation,statement,swizzle_assignment:chained_swizzle:* - 8 cases, 8 subcases (~1/case)
-TOTAL: 285319 cases, 2346405 subcases
+TOTAL: 285329 cases, 2346429 subcases

copybara-service Bot pushed a commit to google/dawn that referenced this pull request Jul 28, 2026
In the WGSL swizzle assignment language feature, duplicate components
are permitted in swizzles on the LHS of an assignment provided that the
final collapsed swizzle that will actually be assigned to is free from
duplicates. Fix validation to account for this.

These have also been tested against new CTS:
gpuweb/cts#4688

Bug: 539634915
Change-Id: I3cc547b1f48d37354379f8f08ec4c913745be3d7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/327796
Reviewed-by: James Price <jrprice@google.com>
Commit-Queue: Natalie Chouinard <chouinard@google.com>
@alan-baker
alan-baker merged commit a152afa into gpuweb:main Jul 29, 2026
1 check passed
@sudonatalie
sudonatalie deleted the swizzle-assign-deduplicate branch July 29, 2026 14:41
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