ComputePipeline
On this page

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 only string
workgroupShaperead only readonly [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[]): void

Record a dispatch into the host’s encoder or compute pass, or a frame’s. Escape hatch (Rule 11.17): the host’s GPUCommandEncoder or GPUComputePassEncoder, which the dispatch records into; WebGL2 takes a frame only.

Source

src/runtime/program.ts, line 428, at commit af54ddad5

Edit this page Report a problem