Runtime

Runtime

21 members

The program runtime that runs compiled programs on WebGPU, and the array a kernel call keeps on the device.

The signature, the description and the examples come from the compiler's own source at commit 26de7be8.

Bindings Type
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.
ComputePipeline Interface
A compute pipeline: one entry, dispatched with bindings by name.
configure Function
Set how a kernel call or a @compute entry's call runs (Rule 11.8).
createRuntime Function
Make a runtime: on the host's device, or on one it requests with the features the programs need.
Frame Interface
One command encoder's work: dispatches and render passes, submitted together.
Geometry Interface
What a draw draws: count vertices, instances times, from the vertex buffer the manifest lays out.
LoadOptions Interface
How rt.load() loads a program.
PassTargets Interface
A render pass's attachments: textures, or a canvas context the host configured, each with what it is cleared to.
Program Interface
A program loaded on a runtime: its manifest and its pipelines.
RenderPass Interface
A render pass of a frame: draws recorded into it.
RenderPipeline Interface
A render pipeline: a vertex entry, a fragment entry and the state, drawn with bindings by name.
RenderState Interface
The fixed-function state of a render pipeline, which the host writes: the compiler knows its entries' inputs and outputs, and the runtime fills and checks those.
resident Function
Wrap a host value once so that it stays on the device across calls: const dev = resident(new Float32Array(512 * 512)); render; const img = await dev.read().
Resident Interface
A value that stays on the device across calls, made by resident: one buffer of both layers.
runtime Function
The default runtime: the one configure named, or one on the device the call layer uses, so a resource made on either layer is used on the other.
Runtime Interface
The program runtime: a device, and everything a program needs on it.
RuntimeOptions Interface
How createRuntime() makes a runtime.
Sampler Interface
A sampler the runtime binds by name.
SamplerOptions Interface
What rt.sampler() makes.
Texture Interface
A texture the runtime binds by name and renders into: a sampled texture, a render target, a depth or shadow map.
TextureOptions Interface
What rt.texture() makes. format is any GPUTextureFormat the device can render to or sample: rgba8unorm, rgba16float, depth24plus, r32float.

Edit this page Report a problem