Rule 3.4
On this page

Rule 3.4

Chapter 3, Textual structure and names Test

A local variable, parameter, module constant or module variable that collides with a GLSL ES 3.00 identifier restriction must be renamed consistently by the GLSL writer; helper function renaming retains its existing behavior. A struct, field, override or binding whose emitted name is reserved remains a warning, and the GLSL emit must fail closed on it.

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

Rationale

GLSL’s variable spellings can change without changing source values. The remaining names belong to interface or host contracts; GLSL is the second target, so its refusal keeps WGSL available.

Derives from

ANGLE at shader version 300, including the gl_ prefix and __ shape restrictions, and the shared GLSL_ES300_RESERVED authority.

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:

sanitizeVariableNames and sanitizeReservedIdents in src/core/backends/glsl-sanitize.ts, the TS8068 warning from reportReservedNames for unchanged interface names, and src/compiler/ts/reserved-names.test.ts.

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

Error codes that enforce it

The diagnostic codes the rule names under Enforced by, or whose registry text names the rule:

TS8068 RESERVED_NAME
A declared name that a target reserves, checked on the name the emit actually carries: half as a struct field, which ANGLE answers with "Illegal use of reserved word" in generated text the author never wrote.

See also

Source

The rule at commit 26de7be8:

Edit this page Report a problem