Add unary, function, and uniformity tests for WGSL immediate pointers (#4677) * Add unary expression tests for WGSL immediate pointers This patch extends address-of and indirection validation to `var<immediate>`. The new cases verify that shaders can take the address of immediate variables, read through `ptr<immediate>` values, and reject writes through those pointers. The generated matrix is limited to store types that are valid for `immediate`; invalid store types are covered by the declaration and pointer type suites. * Add function tests for WGSL immediate pointers This patch extends function restriction tests for `ptr<immediate, u32>` parameters. The new cases verify that immediate pointer parameters follow the `unrestricted_pointer_parameters` language feature gate, that calls can pass the address of a `var<immediate>` to a matching parameter, and that explicit read and write access modes on immediate pointer parameters are rejected. * Add uniformity tests for WGSL immediate reads This patch adds `var<immediate>` reads as a uniform condition source in the uniformity suite. The coverage verifies that control flow depending on immediate data is treated as uniform in the baseline uniformity cases and in the subgroup variants. The cases are skipped unless immediate data support is exposed by the browser.
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.