EntryIoField
인터페이스, 리플렉션 분류
One field of an entry point's stage interface: a @location(n) varying, vertex attribute or fragment draw buffer, or a @builtin(name) slot.
import type { EntryIoField } from 'typeshade'
시그니처, 설명, 예제는 커밋 c66579bf의 컴파일러 소스에서 그대로 가져온 영어 원문입니다.
구문
interface EntryIoField { readonly name: string; readonly type: string; readonly location?: number; readonly builtin?: string;}설명
Where the entry spelled it as a member
of a struct parameter or struct return, the field is reported flattened out of that struct;
see EntryIo.
인스턴스 속성
name읽기 전용stringThe field’s own identifier: a parameter’s name, a flattened struct field’s name, or
_retfor a bare non-struct return value (the name the GLSL backend gives that output).type읽기 전용stringThe DSL type key (the string
typeKeyreturns), the same spellingStructLayout.fields[].typeandVertexAttr.typeuse.location선택 사항읽기 전용numberThe declared
@location(n). Absent on a@builtinfield and on an unattributed one; the two are told apart by whetherbuiltinis set.builtin선택 사항읽기 전용stringThe declared
@builtin(name), in WGSL’s own vocabulary (position,vertex_index, …). Builtins are reported alongside locations. A consumer that compares varyings and leaves builtins out (they are not varyings) filters on this field, and can then report thatpositionwas excluded because it is a builtin.
함께 보기
소스
src/core/reflect.ts, 502행, 커밋 c66579bf 기준