Skip to content

Adds CTS test coverage for the snorm10-10-10-2 vertex format. - #4695

Merged
kainino0x merged 3 commits into
gpuweb:mainfrom
wangra-google:add-rgba10a2snorm-vertex-format
Aug 19, 2026
Merged

Adds CTS test coverage for the snorm10-10-10-2 vertex format.#4695
kainino0x merged 3 commits into
gpuweb:mainfrom
wangra-google:add-rgba10a2snorm-vertex-format

Conversation

@wangra-google

@wangra-google wangra-google commented Aug 17, 2026

Copy link
Copy Markdown
Contributor
  • 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


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.

* 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.
Comment thread src/webgpu/api/operation/vertex_state/correctness.spec.ts Outdated
Comment thread src/webgpu/api/operation/vertex_state/correctness.spec.ts Outdated
Comment thread src/webgpu/capability_info.ts Outdated
Comment thread src/webgpu/capability_info.ts
@github-actions

github-actions Bot commented Aug 19, 2026

Copy link
Copy Markdown

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

@kainino0x
kainino0x merged commit c354d28 into gpuweb:main Aug 19, 2026
1 check passed
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