pub enum BindGroupEntry {
Buffer {
binding: u32,
buffer: JsValue,
offset: u64,
size: Option<u64>,
},
StorageTexture {
binding: u32,
view: JsValue,
read_only: bool,
},
Texture {
binding: u32,
view: JsValue,
},
Sampler {
binding: u32,
sampler: JsValue,
},
}Expand description
A single binding entry inside a BindGroupDescriptor.
Variants§
Buffer
A uniform / storage buffer binding.
In WGSL terms, the buffer’s usage must include UNIFORM for
var<uniform> bindings and STORAGE for var<storage> bindings.
Fields
StorageTexture
A read-write storage texture binding.
The GpuTexture must have been created with STORAGE_BINDING
in its usage flag. Combine with view (a GpuTextureView)
obtained from GpuTexture.createView().
Fields
Texture
A sampled texture binding.
Sampler
A sampler binding.
Implementations§
Source§impl BindGroupEntry
Inherent implementation of BindGroupEntry.
impl BindGroupEntry
Inherent implementation of BindGroupEntry.
Trait Implementations§
Source§impl Clone for BindGroupEntry
impl Clone for BindGroupEntry
Auto Trait Implementations§
impl Freeze for BindGroupEntry
impl RefUnwindSafe for BindGroupEntry
impl Send for BindGroupEntry
impl Sync for BindGroupEntry
impl Unpin for BindGroupEntry
impl UnsafeUnpin for BindGroupEntry
impl UnwindSafe for BindGroupEntry
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