INTRINSIC_HELPERS
이 페이지에서

INTRINSIC_HELPERS

상수, 백엔드 분류

The helper functions an intrinsic's GLSL spelling calls, keyed by intrinsic id.

import { INTRINSIC_HELPERS } from 'typeshade'

시그니처, 설명, 예제는 커밋 c66579bf의 컴파일러 소스에서 그대로 가져온 영어 원문입니다.

구문

const INTRINSIC_HELPERS: Readonly<Record<string, { readonly fn: string; readonly def: string; }>>

설명

fn is the name the spelling calls and def is the GLSL definition of that function. A GLSL writer must emit def for every listed intrinsic that a reachable function calls; otherwise the spelling calls a function the shader never defines. Each definition calls only GLSL builtins, so the definitions can be emitted in any order at the top of the function section, with no prototype. A helper that nothing calls compiles but adds bytes, so key the emit off the calls actually collected.

Only the GLSL target has helpers: WGSL indexes storage buffers directly. Exported from typeshade.

소스

src/core/intrinsics.ts, 1005행, 커밋 c66579bf 기준

이 페이지 편집 문제 보고