TgpuGuardedComputePipeline
Type Parameters
Section titled “Type Parameters”• TArgs extends number[] = number[]
Properties
Section titled “Properties”pipeline
Section titled “pipeline”pipeline:
TgpuComputePipeline
The underlying pipeline used during dispatchThreads.
Defined in
Section titled “Defined in”packages/typegpu/src/core/root/rootTypes.ts:102
sizeUniform
Section titled “sizeUniform”sizeUniform:
TgpuUniform<Vec3u>
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.
Defined in
Section titled “Defined in”packages/typegpu/src/core/root/rootTypes.ts:108
Methods
Section titled “Methods”dispatchThreads()
Section titled “dispatchThreads()”dispatchThreads(…
args):void
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
Defined in
Section titled “Defined in”packages/typegpu/src/core/root/rootTypes.ts:97
with()
Section titled “with()”with(
bindGroup):TgpuGuardedComputePipeline<TArgs>
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>