Adds CTS test coverage for the snorm10-10-10-2 vertex format. - #4695
Merged
kainino0x merged 3 commits intoAug 19, 2026
Conversation
* Adds `snorm10-10-10-2` to `kVertexFormatInfo` in `capability_info.ts` (with an explicit cast until `@webgpu/types` is updated). * Adds signed 10-10-10-2 bit-packing (`makeRgb10a2Signed`) and normalization (`normalizeRgb10a2Signed`) test helpers. * Adds packed format test data in `correctness.spec.ts` to verify conversion from raw vertex data to `vec4<f32>` in the vertex shader. Issue: gpuweb/gpuweb#6292 <hr> **Requirements for PR author:** - [x] All missing test coverage is tracked with "TODO" or `.unimplemented()`. - [x] New helpers are `/** documented */` and new helper files are found in `helper_index.txt`. - [x] Test behaves as expected in a WebGPU implementation. (If not passing, explain above.) - [x] Test have be tested with compatibility mode validation enabled and behave as expected. (If not passing, explain above.) **Requirements for [reviewer sign-off](https://github.com/gpuweb/cts/blob/main/docs/reviews.md):** - [ ] Tests are properly located. - [ ] [Test descriptions](https://github.com/gpuweb/cts/blob/main/docs/intro/plans.md) are accurate and complete. - [ ] Tests provide complete coverage (including validation control cases). **Missing coverage MUST be covered by TODOs.** - [ ] Tests avoid [over-parameterization](https://github.com/gpuweb/cts/blob/main/docs/organization.md#parameterization) (see case count report). When landing this PR, be sure to make any necessary issue status updates.
kainino0x
approved these changes
Aug 19, 2026
|
Results for build job (at 2b8d1a8): -webgpu:api,operation,vertex_state,correctness:vertex_format_to_shader_format_conversion:* - 164 cases, 1476 subcases (~9/case)
-webgpu:api,operation,vertex_state,correctness:setVertexBuffer_offset_and_attribute_offset:* - 41 cases, 1444 subcases (~35/case)
-webgpu:api,operation,vertex_state,correctness:non_zero_array_stride_and_attribute_offset:* - 41 cases, 777 subcases (~19/case)
+webgpu:api,operation,vertex_state,correctness:vertex_format_to_shader_format_conversion:* - 168 cases, 1512 subcases (~9/case)
+webgpu:api,operation,vertex_state,correctness:setVertexBuffer_offset_and_attribute_offset:* - 42 cases, 1472 subcases (~35/case)
+webgpu:api,operation,vertex_state,correctness:non_zero_array_stride_and_attribute_offset:* - 42 cases, 792 subcases (~19/case)
-webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_overlapped:* - 41 cases, 369 subcases (~9/case)
-webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_interleaved:* - 41 cases, 369 subcases (~9/case)
-webgpu:api,operation,vertex_state,correctness:max_buffers_and_attribs:* - 41 cases, 41 subcases (~1/case)
-webgpu:api,operation,vertex_state,correctness:array_stride_zero:* - 41 cases, 686 subcases (~17/case)
+webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_overlapped:* - 42 cases, 378 subcases (~9/case)
+webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_interleaved:* - 42 cases, 378 subcases (~9/case)
+webgpu:api,operation,vertex_state,correctness:max_buffers_and_attribs:* - 42 cases, 42 subcases (~1/case)
+webgpu:api,operation,vertex_state,correctness:array_stride_zero:* - 42 cases, 700 subcases (~17/case)
-webgpu:api,operation,vertex_state,correctness:overlapping_attributes:* - 41 cases, 41 subcases (~1/case)
+webgpu:api,operation,vertex_state,correctness:overlapping_attributes:* - 42 cases, 42 subcases (~1/case)
-webgpu:api,validation,render_pipeline,vertex_state:vertex_shader_type_matches_attribute_format:* - 41 cases, 492 subcases (~12/case)
-webgpu:api,validation,render_pipeline,vertex_state:vertex_attribute_offset_alignment:* - 588 cases, 10584 subcases (~18/case)
[snip - full report in action logs]
-TOTAL: 285339 cases, 2346439 subcases
+TOTAL: 285364 cases, 2347068 subcases |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
snorm10-10-10-2tokVertexFormatInfoincapability_info.ts(with an explicit cast until@webgpu/typesis updated).makeRgb10a2Signed) and normalization (normalizeRgb10a2Signed) test helpers.correctness.spec.tsto verify conversion from raw vertex data tovec4<f32>in the vertex shader.Issue: gpuweb/gpuweb#6292
Requirements for PR author:
.unimplemented()./** documented */and new helper files are found inhelper_index.txt.Requirements for reviewer sign-off:
When landing this PR, be sure to make any necessary issue status updates.