Manual-sync mirror of chromium.googlesource.com/external/github.com/gpuweb/cts.git
Find a file
shaoboyan091 12200d24a6
Add shared support for WGSL immediate validation (#4658)
* Add shared support for WGSL immediate validation

This patch adds the shared CTS plumbing needed by the follow-up
WGSL `immediate` address space validation tests.

It adds `immediate_address_space` to the known WGSL language feature
list, models `immediate` in the address space metadata, and treats it
as a module-scope, unbound, read-only address space with
host-shareable store types.

The validation helpers emit the required WGSL `requires` directive and
skip immediate tests when immediate data is not exposed by the browser.
The skip checks `setImmediates`/`maxImmediateSize` because current
Chrome Canary exposes the API before advertising the WGSL feature.

This also removes two now-unnecessary address-space type assertions
that became redundant once the shared metadata was typed by
`AddressSpace`.

* Apply suggestions from code review

Will remove them when real immediate case added.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Revert "Apply suggestions from code review"

This reverts commit 55434a1ea18b176b33c1a25866938c99282f755c.

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-06-11 08:45:44 +08:00
.github [github] Fix checkout of PR base commit in pr.yml (#4601) 2026-02-19 21:57:55 -08:00
.vscode Add cts.code-workspace for project-global settings. (#299) 2020-09-28 18:09:29 -07:00
docs Generate a case-count report on pull requests (#4548) 2026-01-05 16:36:03 -05:00
src Add shared support for WGSL immediate validation (#4658) 2026-06-11 08:45:44 +08:00
standalone Enable only results failures by default (#4511) 2025-11-26 13:26:06 -05:00
tools gen_wpt_cts_html: Add support for filtering the list of variants (#4102) 2024-12-18 05:49:15 +00:00
.eslint-resolver.js Enable linting for .js files (#3793) 2024-06-10 19:48:41 -07:00
.eslintignore Implement quantizeToF16 f32 tests (#1828) 2022-09-08 15:13:59 -04:00
.eslintrc.json Add hasFeature function and disallow features.has (#4506) 2025-11-19 11:29:39 +09:00
.gitattributes Mark cache files as generated for GitHub (#3593) 2024-04-03 20:52:40 -07:00
.gitignore chore(gitignore): ignore pnpm-lock.yaml (#4556) 2026-01-09 13:44:04 -08:00
babel.config.js Remove babel transforms for ?? .? &&= ||= (#470) 2021-02-23 22:21:39 -08:00
CONTRIBUTING.md Apply suggestion from #210 (#218) 2020-06-10 14:25:37 -07:00
cts.code-workspace Add recommended extensions to code-workspace (#3414) 2024-02-16 12:39:49 -08:00
deploy_key.enc Prepare master branch for automatic build and deploy 2019-08-05 10:57:47 +02:00
Gruntfile.js gen_wpt_cts_html: Add support for filtering the list of variants (#4102) 2024-12-18 05:49:15 +00:00
LICENSE.txt Add license 2019-07-08 08:43:46 -07:00
node.tsconfig.json [dawn-node]: Move TSC config to file. (#1382) 2022-05-11 20:04:17 -07:00
package-lock.json Bump @webgpu/types to 0.1.68 (#4534) 2025-12-18 10:50:38 -08:00
package.json Bump @webgpu/types to 0.1.68 (#4534) 2025-12-18 10:50:38 -08:00
prettier.config.js Make test cases hierarchical, and refactor/cleanup a lot in the process (#181) 2020-05-18 15:33:41 -07:00
README.md Fix readme link (#664) 2021-07-23 01:09:15 +00:00
tsconfig.json Explicitly specify rootDir to satisfy upcoming TypeScript v6. (#4599) 2026-02-20 00:07:16 +00:00
w3c.json Add w3c.json file for W3C tracking purpose 2020-08-20 17:03:30 +02:00

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.