TgpuGuardedComputePipeline
Defined in: packages/typegpu/src/core/root/rootTypes.ts:69
Extends
Section titled “Extends”TgpuNamable
Type Parameters
Section titled “Type Parameters”TArgs extends number[] = number[]
Properties
Section titled “Properties”pipeline
Section titled “pipeline”pipeline:
TgpuComputePipeline
Defined in: packages/typegpu/src/core/root/rootTypes.ts:96
The underlying pipeline used during dispatchThreads.
sizeUniform
Section titled “sizeUniform”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.
Methods
Section titled “Methods”$name()
Section titled “$name()”$name(
label):this
Defined in: packages/typegpu/src/shared/meta.ts:97
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”this
Inherited from
Section titled “Inherited from”TgpuNamable.$name
dispatchThreads()
Section titled “dispatchThreads()”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.
Parameters
Section titled “Parameters”…TArgs
Returns
Section titled “Returns”void
with()
Section titled “with()”Call Signature
Section titled “Call Signature”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).
Parameters
Section titled “Parameters”bindGroup
Section titled “bindGroup”Returns
Section titled “Returns”TgpuGuardedComputePipeline<TArgs>
Call Signature
Section titled “Call Signature”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).
Parameters
Section titled “Parameters”encoder
Section titled “encoder”GPUCommandEncoder
Returns
Section titled “Returns”TgpuGuardedComputePipeline<TArgs>