SD0109
On this page

SD0109

Core code

a fragment-only builtin is reachable from a vertex or compute entry

The registry text and every compiler message on these pages are the compiler's own English.

When it fires

The hint is deliberately generic and enumerates no fix family: the per-builtin fix lives in the rule's FRAGMENT_ONLY_IDS table (the single fix-authority) and reaches the reader through the diagnostic's own message. Enumerating families here would re-create the untested sync contract that table replaced — one new family and the catalogue would lie again.

In the front end

A "use typeshade" file never reaches this check with the same mistake: the front end refuses it first, under its own code. This program, compiled at build time, gets:

example.shade.ts
"use typeshade"
class VsOut {
@builtin("position") pos: vec4
@location(0) uv: vec2
}
@vertex
export function vs(@builtin("vertex_index") i: u32): VsOut {
const x = f32(i)
return { pos: vec4(x, dpdx(x), 0., 1.), uv: vec2(0., 0.) }
}
@fragment
export function fs(v: VsOut): vec4 {
return vec4(v.uv, 0., 1.)
}

TS8099 error, line 9: "dpdx" is only valid in a fragment shader; "vs" is a vertex entry.

How to fix it

The registry's hint: the fix is per-builtin and named in the diagnostic message itself — the fragment-only-builtin rule table (FRAGMENT_ONLY_IDS) is the single fix-authority

See also

TS8099 UNSUPPORTED
UNSUPPORTED (TS8099) is the one deliberate exception to "sequential": it is the catch-all for a diagnostic whose site does not yet deserve its own code, so it stays parked past the sequential range instead of at its head.

Source

Where the compiler raises this code at commit 26de7be8, one line per file:

Edit this page Report a problem