Rule 10.3
On this page

Rule 10.3

Chapter 10, Extensions and capabilities Test

A GLSL ES 3.00 emit that lacks a capability’s row must fail closed with the target sentence, which opens backend 'glsl-es300' cannot emit this module and ends missing capabilities: <ids>; on a module with a render entry that is a TS8015 warning that leaves wgsl in place, and on a compute-only module it is silence, glsl being undefined.

The rule text and the parts under it are the compiler's own English, as the design document writes them.

Rationale

GLSL is the second target of a module whose WGSL exists, so its shortfall must not unsay the compile, and a compute-only module has nothing GLSL ES 3.00 could serve.

Derives from

src/compiler/ts/compile.ts (the comment above emitGlslStages); docs/roadmap.md, “make what does not compile, compile”.

How it is verified

Checked by a test. A test, a gate script or a CI workflow names this rule, and the traceability check fails when a file listed below stops naming it.

Where the rule says the compiler enforces it:

assertCaps, whose throw src/core/passes/required-caps.test.ts asserts by type (UnsupportedFeatureError) and not by text; the sentence is asserted in src/core/backends/glsl-compute.test.ts and glsl.test.ts (/missing capabilities:[\s\S]*compute/); the warning on a render module and the silence on a compute-only one are src/compiler/ts/compile.contract.test.ts (Rule 12.3).

The files that verify it at commit 26de7be8, each at the first line that names the rule:

See also

Source

The rule at commit 26de7be8:

Edit this page Report a problem