Skip to content

Add swizzle assignment validation tests#4587

Open
sudonatalie wants to merge 1 commit intogpuweb:mainfrom
sudonatalie:swizzle-assign-validation
Open

Add swizzle assignment validation tests#4587
sudonatalie wants to merge 1 commit intogpuweb:mainfrom
sudonatalie:swizzle-assign-validation

Conversation

@sudonatalie
Copy link
Contributor

These are validation tests only. A larger set of valid swizzle assignments are covered in the execution tests.

Most of these currently fail in dawn, but do pass with my local WIP implementation of swizzle assignment.

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.

These tests mostly cover invalid swizzle assignments. A larger set of
valid swizzle assignments are covered in the execution tests.
@github-actions
Copy link

github-actions bot commented Feb 6, 2026

Results for build job (at 86836fe):

+webgpu:shader,validation,statement,swizzle_assignment:valid:* - 9 cases, 9 subcases (~1/case)
+webgpu:shader,validation,statement,swizzle_assignment:invalid_lhs_not_reference:* - 3 cases, 3 subcases (~1/case)
+webgpu:shader,validation,statement,swizzle_assignment:invalid_duplicate_components:* - 1 cases, 1 subcases (~1/case)
+webgpu:shader,validation,statement,swizzle_assignment:invalid_component_mismatch:* - 1 cases, 1 subcases (~1/case)
+webgpu:shader,validation,statement,swizzle_assignment:invalid_component_oob:* - 1 cases, 1 subcases (~1/case)
+webgpu:shader,validation,statement,swizzle_assignment:invalid_type_mismatch:* - 1 cases, 1 subcases (~1/case)
-TOTAL: 285993 cases, 2344970 subcases
+TOTAL: 286009 cases, 2344986 subcases

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.

1 participant