EntryIo
인터페이스, 리플렉션 분류
One entry point's @location and @builtin interface: the shape a host validates a vertex/fragment pair against, builds a GPUVertexState from, or diffs as a pipeline contract.
import type { EntryIo } from 'typeshade'
시그니처, 설명, 예제는 커밋 c66579bf의 컴파일러 소스에서 그대로 가져온 영어 원문입니다.
구문
interface EntryIo { readonly inputs: readonly EntryIoField[]; readonly outputs: readonly EntryIoField[];}설명
One entry point’s @location and @builtin interface: the shape a host validates a
vertex/fragment pair against, builds a GPUVertexState from, or diffs as a pipeline
contract. Both sides are flattened. A struct parameter or struct return contributes its
fields, one row each with its own location, because WGSL lets an entry spell the same
varyings either as loose parameters or as one struct, and a consumer comparing two stages
must not care which form each side used. A void return contributes nothing.
outputs is a list, so a fragment entry that writes several attachments (@location(0)
a colour and @location(1) an entity id) is expressible here, where EntryInfo.output’s
single type key cannot represent it.
The fields are read through the same attribute readers the GLSL backend uses for its in
and out declarations, so the published interface and the emitted one cannot disagree.
인스턴스 속성
inputs읽기 전용readonly EntryIoField[]outputs읽기 전용readonly EntryIoField[]
소스
src/core/reflect.ts, 535행, 커밋 c66579bf 기준