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
impl Copy for BufferBindingLayout
Source§impl Debug for BufferBindingLayout
impl Debug for BufferBindingLayout
Source§impl<'de> Deserialize<'de> for BufferBindingLayout
Available on crate feature serde only.
impl<'de> Deserialize<'de> for BufferBindingLayout
serde only.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>,
impl Eq for BufferBindingLayout
Source§impl Hash for BufferBindingLayout
impl Hash for BufferBindingLayout
Source§impl PartialEq for BufferBindingLayout
impl PartialEq for BufferBindingLayout
Source§impl Serialize for BufferBindingLayout
Available on crate feature serde only.
impl Serialize for BufferBindingLayout
serde only.impl StructuralPartialEq for BufferBindingLayout
Auto Trait Implementations§
impl Forget for BufferBindingLayout
impl Freeze for BufferBindingLayout
impl Move for BufferBindingLayout
impl RefUnwindSafe for BufferBindingLayout
impl Send for BufferBindingLayout
impl Sync for BufferBindingLayout
impl Unpin for BufferBindingLayout
impl UnsafeUnpin for BufferBindingLayoutwhere
NonZeroU64Inner: UnsafeUnpin,
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
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> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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
key and return true if they are equal.