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" 파일은 이 검사까지 오지 않습니다. 프런트엔드가 자기 코드로 먼저 거부하기 때문입니다. 빌드할 때 컴파일한 아래 프로그램에는 다음 진단이 나옵니다.
"use typeshade"
interface VsOut { pos: builtin<"position"> uv: location<0, vec2>}
@vertexexport function vs(i: builtin<"vertex_index">): VsOut { const x = f32(i) return { pos: vec4(x, dpdx(x), 0., 1.), uv: vec2(0., 0.) }}
@fragmentexport 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
함께 보기
-
TS8099UNSUPPORTED - 자기 코드를 받을 만하지 않은 진단을 위한 포괄 코드입니다. 순차 범위 뒤인 TS8099에 따로 둡니다.
소스
커밋 af54ddad5에서 컴파일러가 이 코드를 내는 곳입니다. 파일마다 한 줄씩 적었습니다.