Runtime

Runtime

92 members

The program runtime that runs compiled programs on WebGPU, the array a kernel call keeps on the device, and the host types a host view spells values with.

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

array Function
A storage array of the structs of cls that data holds, a Buffer; or, with a typed array, a Buffer of its scalars that keeps it on the device across calls (Amendment A1: array(xs) replaces resident(xs); Amendment A10, Q-I): a Buffer<f32> for a Float32Array or a number[], and so on; or, with a length and an element, a zeroed Buffer of scalars.
Bindings Type
A draw or dispatch binds values by the names the source declares.
BindingsOf Type
The bindings entry K of the manifest P reaches, as a draw or a dispatch passes them: BindingsOf<typeof mesh, 'vs'>.
bool Type
A bool as a host value: a boolean, with its name as a number has its name.
Buffer Interface
An array on the device of length elements T: a Buffer of structs, one range of the region laid out as a storage array with no size (Rule 6.8), made by zeros or array with a class; or a Buffer of scalars or vectors, made by array(xs) of a typed array, array or a kernel called on a resource.
buildInfo Constant
Frozen package information. Source checkouts are unstamped.
callDevice Function
The report of the device the calls run on, as gpuDevice() gives it: the device is requested as a call requests it.
ChunkRate Interface
What a device measured of one chunk key: the time one unit takes, as the device learned it from the chunks so far, how many chunks it ran, the longest of them and the units of the last one.
CompareFunction Type
WebGPU GPUCompareFunction: how a depth test compares a fragment with the stored value.
ComputePipeline Interface
A compute pipeline: one entry, dispatched with bindings by name.
configure Function
Set how a default-owner kernel call or @compute entry's call runs (Rule 11.8).
createDevice Function
Open the owner of a host's kernel calls: on the first tier of prefer that opens, on a GPUDevice the host already has, or on the device of a program runtime.
createRuntime Function
Creates a runtime on the host's device or WebGL2 context, or on the first available tier in `prefer`: a WebGPU device meeting the programs' feature requirements and the limits requested by the programs and `limits` option, or a new WebGL2 context.
DepthAttachment Type
A depth attachment: the depth aspect of one texture, and its stencil object when the format has a stencil aspect.
Device Interface
The owner of a host's kernel calls: the tier they run on, the Buffers they take and the pool those arrays return to, the device's limits and lost signal, the plans of fuse(), and dispose().
DeviceInfo Interface
Frozen, JSON-serializable historical metadata of an opened device.
DeviceOptions Type
How createDevice() opens a device.
DeviceReport Interface
What callDevice() reports of the device the calls run on: its numeric limits, keyed by WebGPU's names, and its enabled features in sorted order.
DeviceStatistics Interface
What a device counts of the arrays it made.
f32 Type
An f32 as a host value (Rule 8.21): a number, which a call rounds as a buffer write rounds it.
f64 Type
An f64 (Rule 4.4) as a host value: a number, kept as a double.
Frame Interface
One command encoder's work: dispatches and render passes, submitted together.
fuse Function
Run a chain of kernel-function calls as one plan, and resolve to a report of what the plan did.
FuseReport Interface
What a fuse scope did once its plan had run.
FuseScope Interface
What the body of a fuse call receives: the scope that records the kernel calls the body makes, and makes the scratch arrays they share.
Geometry Interface
What a draw draws: count vertices, instances times, from the vertex buffer the manifest lays out.
i32 Type
An i32 as a host value: a number, a whole number in the i32 range, which a call checks.
LoadOptions Interface
How rt.load() loads a program.
mat2 Type
mat2, the short spelling of mat2x2, the same type.
mat2x2 Type
A mat2x2 as a host value: a readonly tuple of its 4 components, column-major.
mat2x2f Type
WGSL's mat2x2f, the same type as mat2x2.
mat2x3 Type
A mat2x3, 2 columns of 3 rows, as a host value: a readonly tuple of its 6 components, column-major.
mat2x3f Type
WGSL's mat2x3f, the same type as mat2x3.
mat2x4 Type
A mat2x4, 2 columns of 4 rows, as a host value: a readonly tuple of its 8 components, column-major.
mat2x4f Type
WGSL's mat2x4f, the same type as mat2x4.
mat3 Type
mat3, the short spelling of mat3x3, the same type.
mat3x2 Type
A mat3x2, 3 columns of 2 rows, as a host value: a readonly tuple of its 6 components, column-major.
mat3x2f Type
WGSL's mat3x2f, the same type as mat3x2.
mat3x3 Type
A mat3x3 as a host value: a readonly tuple of its 9 components, column-major.
mat3x3f Type
WGSL's mat3x3f, the same type as mat3x3.
mat3x4 Type
A mat3x4, 3 columns of 4 rows, as a host value: a readonly tuple of its 12 components, column-major.
mat3x4f Type
WGSL's mat3x4f, the same type as mat3x4.
mat4 Type
mat4, the short spelling of mat4x4, the same type.
mat4x2 Type
A mat4x2, 4 columns of 2 rows, as a host value: a readonly tuple of its 8 components, column-major.
mat4x2f Type
WGSL's mat4x2f, the same type as mat4x2.
mat4x3 Type
A mat4x3, 4 columns of 3 rows, as a host value: a readonly tuple of its 12 components, column-major.
mat4x3f Type
WGSL's mat4x3f, the same type as mat4x3.
mat4x4 Type
A mat4x4 as a host value: a readonly tuple of its 16 components, column-major.
mat4x4f Type
WGSL's mat4x4f, the same type as mat4x4.
mergeReports Function
The report of several plans as one, as a plan of several groups reports its own: the dispatches and the submissions summed, the groups in the order given, and the tier the most capable report ran on.
PassTargets Interface
A render pass's attachments: textures, or a canvas context the host configured.
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.
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.
StencilFaceState Interface
WebGPU GPUStencilFaceState: the stencil test and its three operations for one face.
StencilOperation Type
WebGPU GPUStencilOperation: what a stencil test does to the value a pixel stores.
StencilState Interface
The stencil test of a pipeline.
texture Function
A texture of the block's default device: using _ = device.use() names the device, and the texture is the one device.texture(options) 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.
TypeShadeBuildInfo Interface
The package build, separate from a program's compiler or a benchmark's revision.
u32 Type
A u32 as a host value: a number, a whole number from 0 to 4294967295, which a call checks.
uniform Function
A uniform of the struct of cls, a class a shader module exports: one range of the region, zeroed, then given the fields init names.
Uniform Type
A uniform of the struct T: one range of the region laid out by the uniform rules of Rule 6.8, with an accessor for each field.
vec2 Type
A vec2, the vector of two f32, as a host value: a readonly tuple of two f32.
vec2b Type
A vec2b as a host value: a readonly tuple of two bool.
vec2d Type
vec2d, the short spelling of vec2f64, the same type.
vec2f Type
WGSL's vec2f, the same type as vec2.
vec2f64 Type
A vec2f64 (Rule 4.4) as a host value: a readonly tuple of two f64.
vec2i Type
A vec2i as a host value: a readonly tuple of two i32.
vec2u Type
A vec2u as a host value: a readonly tuple of two u32.
vec3 Type
A vec3, the vector of three f32, as a host value: a readonly tuple of three f32.
vec3b Type
A vec3b as a host value: a readonly tuple of three bool.
vec3d Type
vec3d, the short spelling of vec3f64, the same type.
vec3f Type
WGSL's vec3f, the same type as vec3.
vec3f64 Type
A vec3f64 (Rule 4.4) as a host value: a readonly tuple of three f64.
vec3i Type
A vec3i as a host value: a readonly tuple of three i32.
vec3u Type
A vec3u as a host value: a readonly tuple of three u32.
vec4 Type
A vec4, the vector of four f32, as a host value: a readonly tuple of four f32.
vec4b Type
A vec4b as a host value: a readonly tuple of four bool.
vec4d Type
vec4d, the short spelling of vec4f64, the same type.
vec4f Type
WGSL's vec4f, the same type as vec4.
vec4f64 Type
A vec4f64 (Rule 4.4) as a host value: a readonly tuple of four f64.
vec4i Type
A vec4i as a host value: a readonly tuple of four i32.
vec4u Type
A vec4u as a host value: a readonly tuple of four u32.
zeros Function
A storage array of length zeroed structs of cls, a class a shader module exports: one range of the region.

Edit this page Report a problem