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.
3 files changed
tree: 42d9563f65c0e0fa27e0d80e1ffc3fa404ffa809
  1. .github/
  2. .vscode/
  3. docs/
  4. src/
  5. standalone/
  6. tools/
  7. .eslint-resolver.js
  8. .eslintignore
  9. .eslintrc.cjs
  10. .gitattributes
  11. .gitignore
  12. babel.config.js
  13. CONTRIBUTING.md
  14. cts.code-workspace
  15. deploy_key.enc
  16. Gruntfile.js
  17. LICENSE.txt
  18. node.tsconfig.json
  19. package-lock.json
  20. package.json
  21. prettier.config.js
  22. README.md
  23. tsconfig.json
  24. w3c.json
README.md

WebGPU Conformance Test Suite

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.

Launch the standalone CTS runner / test plan viewer

Contributing

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.