SD0109
이 페이지에서

SD0109

코어 코드

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

레지스트리 설명과 컴파일러 메시지는 컴파일러 원문이라 한국어 페이지에서도 영어로 둡니다.

발생 조건

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.

프런트엔드에서

같은 실수를 한 "use typeshade" 파일은 이 검사까지 오지 않습니다. 프런트엔드가 자기 코드로 먼저 거부하기 때문입니다. 빌드할 때 컴파일한 아래 프로그램에는 다음 진단이 나옵니다.

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, 9행: "dpdx" is only valid in a fragment shader; "vs" is a vertex entry.

고치는 법

레지스트리의 힌트: 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

함께 보기

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.

소스

커밋 c66579bf에서 컴파일러가 이 코드를 내는 곳입니다. 파일마다 한 줄씩 적었습니다.

이 페이지 편집 문제 보고