ComputePipeline
Interface in Runtime
A compute pipeline: one entry, dispatched with bindings by name.
import type { ComputePipeline } from 'typeshade/runtime'
The signature, the description and the examples come from the compiler's own source at commit af54ddad5.
Syntax
interface ComputePipeline<B = Bindings> { readonly entry: string; readonly workgroupShape: readonly [number, number, number]; dispatch(target: object, bindings: B, workgroups: number | readonly number[]): void;}Description
B is the bindings the
entry reaches (change 0030). workgroupShape is the resolved [x, y, z] shape for the
constants used to create this pipeline, including any workgroup-size overrides.
Instance properties
entryread onlystringworkgroupShaperead onlyreadonly [number, number, number]The resolved
[x, y, z]workgroup size this pipeline was created with.
Instance methods
dispatch(target: object, bindings: B, workgroups: number | readonly number[]): voidRecord a dispatch into the host’s encoder or compute pass, or a frame’s. Escape hatch (Rule 11.17): the host’s
GPUCommandEncoderorGPUComputePassEncoder, which the dispatch records into; WebGL2 takes a frame only.
Source
src/runtime/program.ts, line 428, at commit af54ddad5