You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/moon_wgsl-issue-tracker.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,10 +16,10 @@ Last updated: 2026-05-08
16
16
|`WGSL-261`| Strict statement terminators | The statement collector treated a closing `}` as a valid terminator for simple statements, so invalid WGSL like `z = 1.0 }` could be accepted by moon_wgsl even though Naga rejects it with `expected ;`. |`DONE`| Statement collection now records whether a statement ended with a top-level semicolon, and strict AST validation marks semicolon-required statements invalid when the semicolon is missing. Template interpolation braces from naga_oil-style `#{...}` are tracked separately from WGSL block braces, so recursive block validation does not descend into source templates. Added parser regressions for assignment, return, and function-call statements without semicolons, and verified the real wgpu `issue_4485.wgsl` invalid source is now rejected before IR lowering. |
17
17
|`WGSL-260`| Composer semantic phase architecture | Even after composer rewrites became symbol-binding-first, several phase boundaries still compressed semantic objects into strings: semantic reference facts were `HashSet[String]`, compose bindings carried `from_name/to_name/identity?`, live binding resolution stored `resolved_to_name`, and transform rewrite bindings accepted string reference names. |`DONE`| Added structured semantic reference path sets, changed compose bindings to carry `WgslSemanticReferencePath` plus a non-optional `WgslComposeSymbolTarget`, changed live binding resolution to pass target symbol objects instead of resolved-name strings, and changed transform rewrite plans to accept `WgslReferencePath` rather than string bindings. Added architecture guardrails banning `add_symbol_binding`, optional identity compose bindings, string-only semantic reference sets, and resolved-name phase state. Verification is tracked with this audit pass on 2026-05-08. |
18
18
|`WGSL-259`| Composer symbol-binding architecture |`WgslReferenceRewritePlan` carried stable symbol identities but still exposed binding rewrites by downgrading them into `WgslRenamePlan`; the final AST rewrite therefore remained name-first at the execution boundary, and unqualified duplicate import bindings could remain ambiguous until transform declined a rewrite. |`DONE`| Removed the binding-plan-to-rename-plan adapters, removed optional identity from plain rename rules, and made reference/declaration binding rewrites consume `WgslReferenceRewriteBinding` directly when collecting AST identifier nodes. Composer binding sets now reject same-scope/same-reference bindings that point at different identities, including unqualified imports. Added guardrails preventing `reference_rename_plan` / `global_declaration_rename_plan` from returning and documenting that composer rewrites must remain symbol-binding-first. Verification is tracked with this audit pass on 2026-05-08. |
19
-
| `WGSL-258` | 100% WGSL/naga-oil quality gate | External real-project WGSL scanning still allowed skipped files to remain implicit, so coverage regressions could hide behind a stable aggregate skipped count. | `IN_PROGRESS` | Replaced the skipped-file path with `testdata/external_wgsl_corpus_expected_failures.tsv`; the external corpus gate now reports `skipped=0` and every non-materialized file is an expected-failure contract keyed by `(repo, rel_path, reason)`. Added real Bevy sprite/UI render source roots plus concrete Bevy tonemapping, deferred, environment-map, SSR, UI, and meshlet profiles; added texture-atomic/cooperative-matrix/64-bit-image-atomic/f64/mesh-shader/ray-hit-vertex-position/per-vertex/binding-array IR/oracle validation plus duplicate import-path candidate selection for Bevy dummy/real modules. Added manifest-owned source materialization for real projects that concatenate, generate, or specialize WGSL before shader module creation, covering wgpu timestamp normalization, wgpu mesh shaders, wgpu ray-query vertex-return shaders, wgpu binding-array and per-vertex shaders, webgpu-samples Cornell shader suffixes/template replacement, webgpu-samples skinned-mesh generated vertex input, and primitive-index/barycentric/multiview validation capabilities. This raises Bevy to 158 source-valid / 149 composed-valid, wgpu to 77 source-valid, Naga to 122 source-valid, webgpu-samples to 68 source-valid, and total external corpus coverage to 475 source-valid files. Remaining work is to burn down the 25 expected failures by fixing the listed compose/IR/profile gaps or proving the external source is intentionally invalid under standalone validation. |
19
+
| `WGSL-258` | 100% WGSL/naga-oil quality gate | External real-project WGSL scanning still allowed skipped files to remain implicit, so coverage regressions could hide behind a stable aggregate skipped count. | `IN_PROGRESS` | Replaced the skipped-file path with `testdata/external_wgsl_corpus_expected_failures.tsv`; the external corpus gate now reports `skipped=0` and every non-materialized file is an expected-failure contract keyed by `(repo, rel_path, reason)`. Added real Bevy sprite/UI render source roots plus concrete Bevy tonemapping, deferred, environment-map, SSR, UI, and meshlet profiles; added texture-atomic/cooperative-matrix/64-bit-image-atomic/f64/mesh-shader/ray-hit-vertex-position/per-vertex/binding-array IR/oracle validation plus duplicate import-path candidate selection for Bevy dummy/real modules. Added manifest-owned source materialization for real projects that concatenate, generate, or specialize WGSL before shader module creation, covering wgpu timestamp normalization, wgpu copy-texture/shader-test templates, wgpu mesh shaders, wgpu ray-query vertex-return shaders, wgpu binding-array and per-vertex shaders, Naga ray-query legacy enable injection, webgpu-samples Cornell shader suffixes/template replacement, webgpu-samples skinned-mesh generated vertex input, and primitive-index/barycentric/multiview validation capabilities. This raises Bevy to 158 source-valid / 149 composed-valid, wgpu to 79 source-valid, Naga to 123 source-valid, webgpu-samples to 68 source-valid, and total external corpus coverage to 478 source-valid files. Remaining work is to burn down the 22 expected failures by fixing the listed compose/IR/profile gaps or proving the external source is intentionally invalid under standalone validation. |
20
20
|`WGSL-257`| 100% naga-oil compose parity | The current real-project gate proves composed outputs are Naga-valid, but it does not prove byte-for-byte or normalized semantic parity with upstream `naga_oil` on the same fixture, shader defs, and additional imports. |`TODO`| Add manifest-driven compose parity profiles that run Rust `naga_oil` oracle and moon_wgsl against the same entry, bool/value defs, capabilities, and fixture roots. Differences must be classified, with critical Bevy PBR/CorePipeline profiles moving to normalized byte parity. |
21
21
|`WGSL-256`| 100% official WGSL syntax coverage | The official CTS gate extracts a useful static valid subset but does not yet exercise all valid/invalid CTS WGSL cases as parser acceptance/rejection contracts. |`IN_PROGRESS`| Added static invalid WGSL extraction and rejection gating: 87 invalid CTS cases are extracted, 64 are rejected by moon IR plus Naga validation, and 23 are explicitly tracked in `testdata/gpuweb_cts_invalid_accepted_by_oracle.txt` because the pinned Naga oracle accepts them. Remaining work is to extract dynamic/template-driven invalid CTS cases rather than only static literals/object cases. |
22
-
| `WGSL-255` | IR invariant validation | Naga validation checks emitted WGSL, but the internal IR can still carry invalid handles, stale type assumptions, illegal pointer/value use, or lost layout/provenance until emit or external validation exposes it indirectly. | `IN_PROGRESS` | Added typed IR validation for expression type availability, scalar control-flow conditions, WGSL `select` mask signatures including `vecN<bool>` masks, switch selectors, return values, lvalue store targets, function-call argument counts/types/results, and root-filtered validation before tree-shaken emission. The validator now catches invalid statement/call/store IR before emission while preserving valid Bevy vector-mask `select` patterns, and the external corpus is at 475 source/IR-valid files with 149 composed Bevy cases. Remaining work is to extend the same validator model across resource binding/address-space compatibility, full access/member legality, layout/provenance invariants, and more statement-level side-effect constraints. |
22
+
| `WGSL-255` | IR invariant validation | Naga validation checks emitted WGSL, but the internal IR can still carry invalid handles, stale type assumptions, illegal pointer/value use, or lost layout/provenance until emit or external validation exposes it indirectly. | `IN_PROGRESS` | Added typed IR validation for expression type availability, scalar control-flow conditions, WGSL `select` mask signatures including `vecN<bool>` masks, switch selectors, return values, lvalue store targets, function-call argument counts/types/results, and root-filtered validation before tree-shaken emission. The validator now catches invalid statement/call/store IR before emission while preserving valid Bevy vector-mask `select` patterns, and the external corpus is at 478 source/IR-valid files with 149 composed Bevy cases. Remaining work is to extend the same validator model across resource binding/address-space compatibility, full access/member legality, layout/provenance invariants, and more statement-level side-effect constraints. |
23
23
| `WGSL-254` | Real shader profile matrix | Bevy, wgpu, and sample shaders are often not standalone source files; many skipped files require concrete shader-def/value-def profiles, additional imports, source fragments, template substitutions, generated snippets, capabilities, or fuller source roots. | `IN_PROGRESS` | Added a manifest-owned external profile matrix with Bevy forward-material bool defs, sprite/UI material roots, prepass visualization defs, SSAO typed value defs, tonemapping binding-index values, deferred/environment/SSR/UI profiles, concrete meshlet culling/raster/material profiles, wgpu timestamp normalization source-prefix profiles, webgpu-samples Cornell suffix/template profiles, and a profile-owned skinned-mesh generated `VertexInput` fragment that mirrors the TypeScript shader-module construction path. The corpus gate now applies those profiles before classification, texture-atomic/texture-int64-atomic/primitive-index/barycentric/multiview/cooperative-matrix/float64/float16-in-float32/mesh-shader/ray-hit-vertex-position/per-vertex/binding-array capability detection covers corresponding real shaders, the oracle normalizes parser-unsupported vendor enable lines only inside the isolated validator, and duplicate Bevy dummy/real module candidates are resolved structurally by active requested symbols. Remaining work is to add profiles or IR support for the remaining feature-context wgpu/Naga files where standalone validation and IR lowering are both available. |
24
24
|`WGSL-253`| Differential fuzzing | The suite still relies mostly on curated regressions and harvested corpora, so broad combinations of expressions, statements, literals, types, and builtin signatures can remain untested until a real project trips them. |`TODO`| Add deterministic WGSL generator cases with Naga as source oracle, then route every generated valid shader through moon parse/IR/emit/Naga. Each found bug must be minimized and promoted into the permanent corpus. |
25
25
|`WGSL-252`| Differential generated testing / pointer locals and unary consts | Generated differential probing exposed two valid WGSL patterns that moon_wgsl mishandled: pointer-valued local variables were auto-loaded when used as pointer values, so `let p = &x; inc(p);` emitted `inc(*p)`, and untyped unary abstract-int constants such as `const NEG = -1;` could not be inferred when used as switch selectors. |`DONE`| Changed local identifier lowering so local variables whose value type is `ptr` are treated as handle values instead of pointee loads, added unary expression type inference for logical-not and signed/bitwise unary operators, and added white-box plus generated differential regressions for pointer-valued locals and unary const switch selectors. Verification is tracked with this audit pass on 2026-05-08. |
Copy file name to clipboardExpand all lines: testdata/external_wgsl_corpus_expected_failures.tsv
-3Lines changed: 0 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,6 @@ naga tests/in/multiview.wgsl raw_invalid_no_preprocessor Expected invalid or cap
7
7
naga tests/in/multiview_webgl.wgsl raw_invalid_no_preprocessor Expected invalid or capability-context Naga corpus source under the standalone validator profile.
8
8
naga tests/in/pointers.wgsl raw_invalid_no_preprocessor Expected invalid or capability-context Naga corpus source under the standalone validator profile.
9
9
naga tests/in/push-constants.wgsl raw_invalid_no_preprocessor Expected invalid or capability-context Naga corpus source under the standalone validator profile.
10
-
naga tests/in/ray-query.wgsl raw_invalid_no_preprocessor Expected invalid or capability-context Naga corpus source under the standalone validator profile.
11
10
naga tests/in/shadow.wgsl raw_invalid_no_preprocessor Expected invalid or capability-context Naga corpus source under the standalone validator profile.
12
11
naga tests/in/skybox.wgsl raw_invalid_no_preprocessor Expected invalid or capability-context Naga corpus source under the standalone validator profile.
13
12
naga tests/out/wgsl/800-out-of-bounds-panic.vert.wgsl raw_invalid_no_preprocessor Expected invalid or capability-context Naga corpus source under the standalone validator profile.
naga tests/out/wgsl/multiview.wgsl raw_invalid_no_preprocessor Expected invalid or capability-context Naga corpus source under the standalone validator profile.
21
20
naga tests/out/wgsl/pointers.wgsl raw_invalid_no_preprocessor Expected invalid or capability-context Naga corpus source under the standalone validator profile.
22
21
naga tests/out/wgsl/samplers.frag.wgsl raw_invalid_no_preprocessor Expected invalid or capability-context Naga corpus source under the standalone validator profile.
23
-
wgpu tests/src/copy_texture_to_buffer.wgsl raw_invalid_no_preprocessor Expected invalid or feature-context wgpu corpus source under the standalone validator profile.
24
22
wgpu tests/tests/wgpu-gpu/regression/issue_4485.wgsl raw_invalid_no_preprocessor Expected invalid or feature-context wgpu corpus source under the standalone validator profile.
25
23
wgpu tests/tests/wgpu-gpu/shader/compilation_messages/error_shader.wgsl raw_invalid_no_preprocessor Expected invalid or feature-context wgpu corpus source under the standalone validator profile.
26
-
wgpu tests/tests/wgpu-gpu/shader/shader_test.wgsl raw_invalid_no_preprocessor Expected invalid or feature-context wgpu corpus source under the standalone validator profile.
wgpu tests/tests/wgpu-gpu/shader/shader_test.wgsl - - - - - - {{header}}=,{{input_members}}=member: u32,{{input_bindings}}=@group(0) @binding(0),{{storage_type}}=uniform,{{input_type}}=CustomStruct,{{output_type}}=array<u32>,{{body}}=output[0u] = input.member; wgpu shader test template materialized with a concrete uniform-input scalar case generated by the Rust harness.
40
42
wgpu tests/tests/wgpu-gpu/timestamp_normalization/shift_right_u96.wgsl - - - - wgpu-core/src/timestamp_normalization/common.wgsl - - wgpu timestamp normalization test shader exactly as Rust builds it by prefixing common.wgsl.
41
43
wgpu tests/tests/wgpu-gpu/timestamp_normalization/u64_mul_u32.wgsl - - - - wgpu-core/src/timestamp_normalization/common.wgsl - - wgpu timestamp normalization test shader exactly as Rust builds it by prefixing common.wgsl.
44
+
naga tests/in/ray-query.wgsl - - - ray-query profile://naga/ray_query_enable.wgsl - - Naga ray-query legacy input materialized with the enable line required by the current WGSL parser.
42
45
webgpu-samples sample/cornell/radiosity.wgsl - - - - - sample/cornell/common.wgsl - Cornell sample compute shader exactly as TypeScript builds it by appending common.wgsl.
43
46
webgpu-samples sample/cornell/rasterizer.wgsl - - - - - sample/cornell/common.wgsl - Cornell sample rasterizer shader exactly as TypeScript builds it by appending common.wgsl.
44
47
webgpu-samples sample/cornell/raytracer.wgsl - - - - - sample/cornell/common.wgsl - Cornell sample raytracer shader exactly as TypeScript builds it by appending common.wgsl.
0 commit comments