Enum wgpu_types::BufferBindingType
source · [−]pub enum BufferBindingType {
Uniform,
Storage {
read_only: bool,
},
}
Expand description
Specific type of a buffer binding.
Corresponds to WebGPU GPUBufferBindingType
.
Variants
Uniform
A buffer for uniform values.
Example GLSL syntax:
layout(std140, binding = 0)
uniform Globals {
vec2 aUniform;
vec2 anotherUniform;
};
Storage
Fields
read_only: bool
If true
, the buffer can only be read in the shader,
and it must be annotated with readonly
.
Example GLSL syntax:
layout (set=0, binding=0) readonly buffer myStorageBuffer {
vec4 myElement[];
};
A storage buffer.
Example GLSL syntax:
layout (set=0, binding=0) buffer myStorageBuffer {
vec4 myElement[];
};
Trait Implementations
sourceimpl Clone for BufferBindingType
impl Clone for BufferBindingType
sourcefn clone(&self) -> BufferBindingType
fn clone(&self) -> BufferBindingType
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for BufferBindingType
impl Debug for BufferBindingType
sourceimpl Default for BufferBindingType
impl Default for BufferBindingType
sourceimpl Hash for BufferBindingType
impl Hash for BufferBindingType
sourceimpl PartialEq<BufferBindingType> for BufferBindingType
impl PartialEq<BufferBindingType> for BufferBindingType
sourcefn eq(&self, other: &BufferBindingType) -> bool
fn eq(&self, other: &BufferBindingType) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &BufferBindingType) -> bool
fn ne(&self, other: &BufferBindingType) -> bool
This method tests for !=
.
impl Copy for BufferBindingType
impl Eq for BufferBindingType
impl StructuralEq for BufferBindingType
impl StructuralPartialEq for BufferBindingType
Auto Trait Implementations
impl RefUnwindSafe for BufferBindingType
impl Send for BufferBindingType
impl Sync for BufferBindingType
impl Unpin for BufferBindingType
impl UnwindSafe for BufferBindingType
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more