WebGpuBindingLayouts class final

The bind group layouts one stage pair needs, and the pipeline layout over them.

Stated rather than inferred, and the other answer has a cost attached. createRenderPipeline accepts the string "auto" and works a layout out from the WGSL, which is what a spike does; the bind groups such a pipeline hands out belong to that pipeline alone, so two pipelines built that way cannot share a group even when their bindings are identical. For a renderer with one camera block and forty materials that is forty copies of the camera. Built here from the bundle's reflection, one layout serves every pipeline of the pair, and a pass keys its bind groups on the resources rather than on which pipeline asked for them.

Made once per stage pair and cached by the device — see WebGpuDevice.bindingsFor.

Constructors

WebGpuBindingLayouts.of(GPUDevice gpu, WebGpuPipeline pipeline)
The layouts for pipeline, built against gpu.
factory

Properties

groups List<GPUBindGroupLayout>
Index n is @group(n).
final
hashCode int
The hash code for this object.
no setterinherited
pipelineLayout GPUPipelineLayout
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shapes List<WebGpuGroupShape>
What each of groups holds, for assembling a bind group and ordering its dynamic offsets.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited