pub enum BindingKind {
Texture {
visibility: ShaderStages,
sample_type: TextureSampleType,
view_dimension: TextureViewDimension,
multisampled: bool,
},
StorageTexture {
visibility: ShaderStages,
format: TextureFormat,
access: StorageTextureAccess,
view_dimension: TextureViewDimension,
},
Sampler {
visibility: ShaderStages,
},
ComparisonSampler {
visibility: ShaderStages,
},
UniformBuffer {
visibility: ShaderStages,
has_dynamic_offset: bool,
min_binding_size: Option<u64>,
},
StorageBufferReadOnly {
visibility: ShaderStages,
has_dynamic_offset: bool,
min_binding_size: Option<u64>,
},
StorageBufferReadWrite {
visibility: ShaderStages,
has_dynamic_offset: bool,
min_binding_size: Option<u64>,
},
}Expand description
What kind of resource one bind group slot expects — texture, sampler, or
buffer, with wgpu-level details (visibility, dynamic offsets, etc).
Usually built via a constructor (texture_2d, uniform_buffer, …)
rather than the variants directly.
Variants§
Texture
StorageTexture
Fields
§
visibility: ShaderStages§
format: TextureFormat§
access: StorageTextureAccess§
view_dimension: TextureViewDimensionSampler
Fields
§
visibility: ShaderStagesComparisonSampler
Fields
§
visibility: ShaderStagesUniformBuffer
StorageBufferReadOnly
StorageBufferReadWrite
Implementations§
Source§impl BindingKind
impl BindingKind
pub fn texture_2d(visibility: ShaderStages) -> Self
pub fn texture_2d_array(visibility: ShaderStages) -> Self
pub fn texture_cubemap(visibility: ShaderStages) -> Self
pub fn storage_texture( visibility: ShaderStages, format: TextureFormat, access: StorageTextureAccess, view_dimension: TextureViewDimension, ) -> Self
pub fn sampler(visibility: ShaderStages) -> Self
pub fn comparison_sampler(visibility: ShaderStages) -> Self
pub fn uniform_buffer(visibility: ShaderStages) -> Self
pub fn dynamic_uniform_buffer( visibility: ShaderStages, element_size: u64, ) -> Self
pub fn storage_buffer_read_only(visibility: ShaderStages) -> Self
pub fn storage_buffer_read_write(visibility: ShaderStages) -> Self
pub fn dynamic_storage_buffer( visibility: ShaderStages, element_size: u64, read_only: bool, ) -> Self
pub fn visibility(&self) -> ShaderStages
Trait Implementations§
Source§impl Clone for BindingKind
impl Clone for BindingKind
Source§fn clone(&self) -> BindingKind
fn clone(&self) -> BindingKind
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for BindingKind
impl Eq for BindingKind
Source§impl Hash for BindingKind
impl Hash for BindingKind
Source§impl PartialEq for BindingKind
impl PartialEq for BindingKind
impl StructuralPartialEq for BindingKind
Auto Trait Implementations§
impl Freeze for BindingKind
impl RefUnwindSafe for BindingKind
impl Send for BindingKind
impl Sync for BindingKind
impl Unpin for BindingKind
impl UnsafeUnpin for BindingKind
impl UnwindSafe for BindingKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> Component for T
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more