Bindings
Type in Runtime
The values a draw or a dispatch binds, by the names the source declares: a Texture, a Sampler, a plain host value (Rule 8.21) the runtime packs by the binding's layout, a Resident, or the host's own GPUBuffer, GPUTexture, GPUTextureView or GPUSampler.
import type { Bindings } from 'typeshade/runtime'
The signature, the description and the examples come from the compiler's own source at commit 26de7be8.
Syntax
type Bindings = Readonly<Record<string, unknown>>;Description
A plain value is packed into a buffer of its own at each draw and each dispatch, so the draws
of one pass that bind different values of one binding each read their own. The buffers come
back to the runtime once the frame has run. A Resident is one buffer every draw shares. The
bindings a draw names are the ones its entries reach: a name they do not reach is refused.
Source
src/runtime/program.ts, line 44, at commit 26de7be8