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:114

The underlying pipeline used during dispatchThreads.


sizeUniform: TgpuUniform<Vec3u>

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

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:109

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>


withPerformanceCallback(callback): TgpuGuardedComputePipeline<TArgs>

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

Returns a pipeline wrapper with the given performance callback attached. Analogous to TgpuComputePipeline.withPerformanceCallback(callback).

(start, end) => void | Promise<void>

TgpuGuardedComputePipeline<TArgs>


withTimestampWrites(options): TgpuGuardedComputePipeline<TArgs>

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

Returns a pipeline wrapper with the given timestamp writes configuration. Analogous to TgpuComputePipeline.withTimestampWrites(options).

number

number

GPUQuerySet | TgpuQuerySet<"timestamp">

TgpuGuardedComputePipeline<TArgs>