ResourceKind
이 페이지에서

ResourceKind

타입, 리플렉션 분류

What a bind entry is at the host API, independent of the WGSL address space or type that declared it.

import type { ResourceKind } from 'typeshade'

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

구문

type ResourceKind =
'uniform-buffer' | 'storage-buffer' | 'texture' | 'storage-texture' | 'sampler';

설명

A host switches on this field to pick its GPU resource type. 'uniform-buffer' and 'storage-buffer' are both backed by a buffer; the entry’s access, present only on a storage buffer, further splits it into read-only and read-write. 'texture' and 'sampler' are the two kinds a buffer-only host must reject. On the GLSL ES 3.00 backend a 'sampler' entry is folded into its paired 'texture' entry’s combined sampler2D uniform and gets no declaration of its own; it still appears in bindGroups, since reflection reports the module’s structure, with nothing separate for a host to bind.

소스

src/core/reflect.ts, 321행, 커밋 c66579bf 기준

이 페이지 편집 문제 보고