stageOf
이 페이지에서

stageOf()

함수, IR 분류

The stage of a function declaration: 'vertex', 'fragment' or 'compute' for an entry point, undefined for a helper.

import { stageOf } from 'typeshade'

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

구문

const stageOf: (
f: Pick<FuncDecl, "stage" | "attrs">,
) => "vertex" | "fragment" | "compute" | undefined

매개변수

f Pick<FuncDecl, 'stage' | 'attrs'>

반환값

'vertex' | 'fragment' | 'compute' | undefined

설명

The stage of a function declaration: 'vertex', 'fragment' or 'compute' for an entry point, undefined for a helper. It reads the structured stage field first and falls back to the attrs strings for a hand-built FuncDecl literal. Every stage decision in the package (reflect, the capability gate, GLSL entry classification, the roots of dead-function elimination) goes through this one function.

함께 보기

소스

src/core/ir/nodes.ts, 888행, 커밋 c66579bf 기준

이 페이지 편집 문제 보고