Enum wgpu::BindingResource
source · #[non_exhaustive]pub enum BindingResource<'a> {
Buffer(BufferBinding<'a>),
BufferArray(&'a [BufferBinding<'a>]),
Sampler(&'a Sampler),
SamplerArray(&'a [&'a Sampler]),
TextureView(&'a TextureView),
TextureViewArray(&'a [&'a TextureView]),
}
Expand description
Resource that can be bound to a pipeline.
Corresponds to WebGPU GPUBindingResource
.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Buffer(BufferBinding<'a>)
Binding is backed by a buffer.
Corresponds to wgt::BufferBindingType::Uniform
and wgt::BufferBindingType::Storage
with BindGroupLayoutEntry::count
set to None.
BufferArray(&'a [BufferBinding<'a>])
Binding is backed by an array of buffers.
Features::BUFFER_BINDING_ARRAY
must be supported to use this feature.
Corresponds to wgt::BufferBindingType::Uniform
and wgt::BufferBindingType::Storage
with BindGroupLayoutEntry::count
set to Some.
Sampler(&'a Sampler)
Binding is a sampler.
Corresponds to wgt::BindingType::Sampler
with BindGroupLayoutEntry::count
set to None.
SamplerArray(&'a [&'a Sampler])
Binding is backed by an array of samplers.
Features::TEXTURE_BINDING_ARRAY
must be supported to use this feature.
Corresponds to wgt::BindingType::Sampler
with BindGroupLayoutEntry::count
set
to Some.
TextureView(&'a TextureView)
Binding is backed by a texture.
Corresponds to wgt::BindingType::Texture
and wgt::BindingType::StorageTexture
with
BindGroupLayoutEntry::count
set to None.
TextureViewArray(&'a [&'a TextureView])
Binding is backed by an array of textures.
Features::TEXTURE_BINDING_ARRAY
must be supported to use this feature.
Corresponds to wgt::BindingType::Texture
and wgt::BindingType::StorageTexture
with
BindGroupLayoutEntry::count
set to Some.
Trait Implementations§
source§impl<'a> Clone for BindingResource<'a>
impl<'a> Clone for BindingResource<'a>
source§fn clone(&self) -> BindingResource<'a>
fn clone(&self) -> BindingResource<'a>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more