DERIVATIVE_INTRINSICS
상수, 백엔드 분류
The intrinsics whose value is a difference between neighbouring invocations, so WGSL requires uniform control flow at the call: the derivatives themselves and every sampling form that derives its level of detail implicitly.
import { DERIVATIVE_INTRINSICS } from 'typeshade'
시그니처, 설명, 예제는 커밋 c66579bf의 컴파일러 소스에서 그대로 가져온 영어 원문입니다.
구문
const DERIVATIVE_INTRINSICS: ReadonlySet<string>설명
Derived from the catalogue above rather than listed, so a sampling id added there joins by
construction: every textureSample… id that is not an explicit-Level or Grad form needs
the implicit LOD, and dpdx / dpdy / fwidth and their Coarse and Fine variants are
the derivative. textureSampleLevel, textureSampleGrad and textureSampleCompareLevel
carry the level the author wrote and are therefore legal anywhere — which is why the
diagnostic for one of these names them as the fix.
Not the same question as fragment-only-builtin’s FRAGMENT_ONLY_IDS, which asks which
stage may reach an id and carries a per-id fix string; that map is a subset of this set,
pinned by a test rather than derived, because a fix sentence is written, not computed.
소스
src/core/intrinsics.ts, 1175행, 커밋 c66579bf 기준