Commit 8db7a3e
WGSL: document a known limitation of the nested-constituent fold
A reviewer-identified edge case: an aggregate that is both a nested constituent
and used directly (a named `static const` array shared as an element of another
`static const` array and also independently runtime-indexed) is not folded
inline, so it stays a separate `var<private>` declaration that the enclosing
converted array's initializer references by name -- invalid WGSL. The shape is
not constructible from typical anonymous nested literals and is not a regression
(such a constant was rejected before this change too, as a runtime-indexed
`const`). Record it where the fold decision is made.
Co-authored-by: Harsh Aggarwal <haaggarwal@nvidia.com>1 parent 9f4c902 commit 8db7a3e
1 file changed
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1426 | 1426 | | |
1427 | 1427 | | |
1428 | 1428 | | |
| 1429 | + | |
| 1430 | + | |
| 1431 | + | |
| 1432 | + | |
| 1433 | + | |
| 1434 | + | |
| 1435 | + | |
| 1436 | + | |
1429 | 1437 | | |
1430 | 1438 | | |
1431 | 1439 | | |
| |||
0 commit comments