(n: number)
| 3263 | ); |
| 3264 | } |
| 3265 | // And the mirror obligation, for a scalar the checks above left standing (a |
| 3266 | // builtin whose permission table admits a scalar in a slot the language |
| 3267 | // nonetheless declares `vecN`). Defensive: with today's tables every mixed |
| 3268 | // scalar/`vecN` call already declines above, and the ALL-SCALAR calls — the |
| 3269 | // ones this rule exists for — returned before reaching here. |
| 3270 | declineVectorOnly(); |
| 3271 | } |
| 3272 | |
| 3273 | /** |
| 3274 | * Fold a variadic application of a 2-argument shader builtin (`min`/`max`) |
| 3275 | * into a left-nested tree of 2-argument calls: `max(max(a, b), c)`. GLSL and |
| 3276 | * WGSL do not accept a 3+-argument `min`/`max`, so emitting `max(a, b, c)` |
| 3277 | * would be invalid shader source. |
| 3278 | * |
| 3279 | * Each GENERATED call is validated as it is produced, against the ORIGINAL |
| 3280 | * operand shapes (`gpuOperandShape`) rather than against the emitted source: |
| 3281 | * once the fold has nested the calls, the CE operand positions no longer line |
| 3282 | * up with the emitted argument positions, and the generic gate's source-level |
| 3283 | * reconstruction (`gpuSourceIsVector`) cannot see a vector in a BARE |
no test coverage detected