Adds CTS test coverage for the `snorm10-10-10-2` vertex format. (#4695) * This PR adds CTS test coverage for the `snorm10-10-10-2` vertex format. * 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: https://github.com/gpuweb/gpuweb/issues/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. * Roll @webgpu/types to 0.1.72 * Address review comments on makeRgb10a2Signed --------- Co-authored-by: Kai Ninomiya <kainino@chromium.org>
This is the conformance test suite for WebGPU. It tests the behaviors defined by the WebGPU specification.
The contents of this test suite are considered normative; implementations must pass them to be WebGPU-conformant. Mismatches between the specification and tests are bugs.
This test suite can be embedded inside WPT or run in standalone.
Please read the introductory guidelines before contributing. Other documentation may be found in docs/ and in the helper index (source).
Read CONTRIBUTING.md on licensing.
For realtime communication about WebGPU spec and test, join the #WebGPU:matrix.org room on Matrix.