Skip to content

TgpuGuardedComputePipeline

Defined in: packages/typegpu/src/core/root/rootTypes.ts:69

  • TgpuNamable

TArgs extends number[] = number[]

pipeline: TgpuComputePipeline

Defined in: packages/typegpu/src/core/root/rootTypes.ts:96

The underlying pipeline used during dispatchThreads.


sizeUniform: TgpuUniform<Vec3u>

Defined in: packages/typegpu/src/core/root/rootTypes.ts:102

The buffer used to automatically pass the thread count to the underlying pipeline during dispatchThreads. For pipelines with a dimension count lower than 3, the remaining coordinates are expected to be 1.

$name(label): this

Defined in: packages/typegpu/src/shared/meta.ts:97

string

this

TgpuNamable.$name


dispatchThreads(…args): void

Defined in: packages/typegpu/src/core/root/rootTypes.ts:91

Dispatches the pipeline. Unlike TgpuComputePipeline.dispatchWorkgroups(), this method takes in the number of threads to run in each dimension.

Under the hood, the number of expected threads is sent as a uniform, and “guarded” by a bounds check.

TArgs

void


with(bindGroup): TgpuGuardedComputePipeline<TArgs>

Defined in: packages/typegpu/src/core/root/rootTypes.ts:74

Returns a pipeline wrapper with the specified bind group bound. Analogous to TgpuComputePipeline.with(bindGroup).

TgpuBindGroup

TgpuGuardedComputePipeline<TArgs>

with(encoder): TgpuGuardedComputePipeline<TArgs>

Defined in: packages/typegpu/src/core/root/rootTypes.ts:81

Returns a pipeline wrapper that encodes dispatches into the provided command encoder instead of submitting them immediately. Analogous to TgpuComputePipeline.with(encoder).

GPUCommandEncoder

TgpuGuardedComputePipeline<TArgs>