pub enum BindGroupEntry<'a, D: Device> {
Buffer {
binding: u32,
buffer: &'a D::Buffer,
},
BufferRange {
binding: u32,
buffer: &'a D::Buffer,
offset: u64,
size: u64,
},
Texture {
binding: u32,
view: &'a D::TextureView,
},
Sampler {
binding: u32,
sampler: &'a D::Sampler,
},
}Expand description
A live resource bound into a slot.
Variants§
Buffer
A whole buffer.
BufferRange
A contiguous slice of a buffer.
Binding a range rather than a whole buffer is what lets one packed table be drawn as several groups: each group’s shader sees its slice starting at instance zero, so no draw needs a first-instance offset — a capability the portable baseline does not guarantee.
Fields
Texture
A texture view.
Sampler
A sampler.
Trait Implementations§
Auto Trait Implementations§
impl<'a, D> Freeze for BindGroupEntry<'a, D>
impl<'a, D> RefUnwindSafe for BindGroupEntry<'a, D>where
&'a <D as Device>::Buffer: RefUnwindSafe,
&'a <D as Device>::TextureView: RefUnwindSafe,
&'a <D as Device>::Sampler: RefUnwindSafe,
impl<'a, D> Send for BindGroupEntry<'a, D>
impl<'a, D> Sync for BindGroupEntry<'a, D>
impl<'a, D> Unpin for BindGroupEntry<'a, D>
impl<'a, D> UnsafeUnpin for BindGroupEntry<'a, D>where
&'a <D as Device>::Buffer: UnsafeUnpin,
&'a <D as Device>::TextureView: UnsafeUnpin,
&'a <D as Device>::Sampler: UnsafeUnpin,
impl<'a, D> UnwindSafe for BindGroupEntry<'a, D>where
&'a <D as Device>::Buffer: UnwindSafe,
&'a <D as Device>::TextureView: UnwindSafe,
&'a <D as Device>::Sampler: UnwindSafe,
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