Enum wgpu::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
sourcefn default() -> BufferBindingType
fn default() -> BufferBindingType
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for BufferBindingType
impl<'de> Deserialize<'de> for BufferBindingType
sourcefn deserialize<__D>(
__deserializer: __D
) -> Result<BufferBindingType, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<BufferBindingType, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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 !=
.
sourceimpl Serialize for BufferBindingType
impl Serialize for BufferBindingType
sourcefn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
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
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.