pub enum ComputeBindingKind {
StorageBufferReadOnly {
has_dynamic_offset: bool,
min_binding_size: Option<BufferSize>,
},
StorageBufferReadWrite {
has_dynamic_offset: bool,
min_binding_size: Option<BufferSize>,
},
UniformBuffer {
has_dynamic_offset: bool,
min_binding_size: Option<BufferSize>,
},
Texture {
sample_type: TextureSampleType,
view_dimension: TextureViewDimension,
multisampled: bool,
},
StorageTexture {
format: TextureFormat,
access: StorageTextureAccess,
view_dimension: TextureViewDimension,
},
Sampler,
ComparisonSampler,
}Variants§
StorageBufferReadOnly
StorageBufferReadWrite
UniformBuffer
Texture
StorageTexture
Sampler
ComparisonSampler
Implementations§
Source§impl ComputeBindingKind
impl ComputeBindingKind
pub fn texture_2d() -> Self
pub fn storage_buffer_read_only() -> Self
pub fn storage_buffer_read_write() -> Self
pub fn uniform_buffer() -> Self
Sourcepub fn dynamic_uniform_buffer(element_size: u64) -> Self
pub fn dynamic_uniform_buffer(element_size: u64) -> Self
A uniform buffer bound with a per-dispatch dynamic offset, e.g. one large buffer
holding many elements’ data, rebound at a different offset via
ComputePass::set_bind_group’s dynamic offsets slice instead of a bind group per
dispatch. element_size is the size in bytes of a single element (before alignment
padding). Use crate::wgpu::buffers::build_dynamic_uniform_buffer to allocate the
backing buffer and crate::wgpu::buffers::dynamic_buffer_binding (not
buffer.as_entire_binding()) to build the bind group entry for it — the entry must
be scoped to one element’s size, not the whole buffer, or dynamic offsets will fail
validation.
Sourcepub fn dynamic_storage_buffer(element_size: u64, read_only: bool) -> Self
pub fn dynamic_storage_buffer(element_size: u64, read_only: bool) -> Self
A storage buffer bound with a per-dispatch dynamic offset. See Self::dynamic_uniform_buffer.
pub fn layout_entry(&self, binding: u32) -> BindGroupLayoutEntry
Trait Implementations§
Source§impl Clone for ComputeBindingKind
impl Clone for ComputeBindingKind
Source§fn clone(&self) -> ComputeBindingKind
fn clone(&self) -> ComputeBindingKind
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 ComputeBindingKind
impl Eq for ComputeBindingKind
Source§impl Hash for ComputeBindingKind
impl Hash for ComputeBindingKind
Source§impl PartialEq for ComputeBindingKind
impl PartialEq for ComputeBindingKind
impl StructuralPartialEq for ComputeBindingKind
Auto Trait Implementations§
impl Freeze for ComputeBindingKind
impl RefUnwindSafe for ComputeBindingKind
impl Send for ComputeBindingKind
impl Sync for ComputeBindingKind
impl Unpin for ComputeBindingKind
impl UnsafeUnpin for ComputeBindingKind
impl UnwindSafe for ComputeBindingKind
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§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<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