Expand description
Shared bind-group vocabulary for material and
compute — a material’s own bind group and a compute
pass’s own bind group are described the same way, differing only in
which shader stage(s) can see each entry (a material entry can be
FRAGMENT/VERTEX/VERTEX_FRAGMENT; a compute entry is always exactly
COMPUTE). Every constructor below takes visibility explicitly rather
than guessing a default per module — build_material/
build_compute validate it’s
appropriate for the pipeline kind they’re building, panicking with a
clear message otherwise.
Structs§
- Binding
Entry - One binding within a material’s or compute pass’s own bind group (see
MaterialDescriptor::entries/ComputeDescriptor::entries).
Enums§
- Binding
Kind - What kind of resource a single
BindingEntrybinds, the wgpu binding parameters that go with it, and which shader stage(s) can see it. Construct via thetexture_*/*_buffer/sampler/storage_textureassociated functions rather than the variants directly — they fill in the usual defaults (filterable float textures, non-dynamic buffers) so only the cases that actually differ need spelling out.
Traits§
- Bind
Group Target - Implemented by
GPUMaterialandGPUCompute— anything with its own bind group layout and named entries that aGPUBindingInstancecan bind concrete resources against.
Functions§
- build_
bind_ group_ layout - Build a
wgpu::BindGroupLayoutfromentries, panicking if two entries claim the same@binding(N)— this makes a shader-mismatched binding layout fail loudly here instead of silently misbehaving at draw/dispatch time.