pub struct BufferBindingLayout {
pub ty: BufferBindingType,
pub has_dynamic_offset: bool,
pub min_binding_size: Option<BufferSize>,
}Expand description
A buffer binding.
Corresponds to WebGPU GPUBufferBindingLayout.
Fields§
§ty: BufferBindingTypeSub-type of the buffer binding.
has_dynamic_offset: boolIndicates that the binding has a dynamic offset.
One offset must be passed to RenderPass::set_bind_group
for each dynamic binding in increasing order of binding number.
min_binding_size: Option<BufferSize>The minimum size for a BufferBinding matching this entry, in bytes.
If this is Some(size):
-
When calling
Device::create_bind_group, the resource at this bind point must be aBindingResource::Bufferwhose effective size is at leastsize. -
When calling
Device::create_render_pipelineorDevice::create_compute_pipeline,sizemust be at least the minimum buffer binding size for the shader module global at this bind point: large enough to hold the global’s value, along with one element of a trailing runtime-sized array, if present.
If this is None:
- Each draw or dispatch command checks that the buffer range at this bind point satisfies the minimum buffer binding size.
Trait Implementations§
Source§impl Clone for BufferBindingLayout
impl Clone for BufferBindingLayout
Source§fn clone(&self) -> BufferBindingLayout
fn clone(&self) -> BufferBindingLayout
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BufferBindingLayout
impl Debug for BufferBindingLayout
Source§impl<'de> Deserialize<'de> for BufferBindingLayout
impl<'de> Deserialize<'de> for BufferBindingLayout
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Hash for BufferBindingLayout
impl Hash for BufferBindingLayout
Source§impl PartialEq for BufferBindingLayout
impl PartialEq for BufferBindingLayout
Source§impl Serialize for BufferBindingLayout
impl Serialize for BufferBindingLayout
impl Copy for BufferBindingLayout
impl Eq for BufferBindingLayout
impl StructuralPartialEq for BufferBindingLayout
Auto Trait Implementations§
impl Freeze for BufferBindingLayout
impl RefUnwindSafe for BufferBindingLayout
impl Send for BufferBindingLayout
impl Sync for BufferBindingLayout
impl Unpin for BufferBindingLayout
impl UnsafeUnpin for BufferBindingLayout
impl UnwindSafe for BufferBindingLayout
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
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>
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>
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