pub struct Bindless { /* private fields */ }Expand description
a large table of textures, samplers and buffers that shaders index (level Voll): binding 0 sampled textures, 1 samplers, 2 storage buffers, 3 storage textures; slots may be changed while command buffers that use the table are pending, as long as those do not use the slot
Implementations§
Source§impl Bindless
impl Bindless
Sourcepub fn layout(&self) -> &BindGroupLayout
pub fn layout(&self) -> &BindGroupLayout
its layout (PipelineLayoutDesc::groups)
Sourcepub fn counts(&self) -> [u32; 4]
pub fn counts(&self) -> [u32; 4]
slots per binding: textures, samplers, buffers, storage textures
Sourcepub fn set_texture(&self, slot: u32, view: &TextureView) -> Result<()>
pub fn set_texture(&self, slot: u32, view: &TextureView) -> Result<()>
slot of binding 0: a sampled texture (Layout::Sampled when shaders read it)
Sourcepub fn set_buffer(
&self,
slot: u32,
buf: &Buffer,
offset: u64,
size: u64,
) -> Result<()>
pub fn set_buffer( &self, slot: u32, buf: &Buffer, offset: u64, size: u64, ) -> Result<()>
slot of binding 2: a storage buffer range (size 0: to the end)
Sourcepub fn set_storage_texture(&self, slot: u32, view: &TextureView) -> Result<()>
pub fn set_storage_texture(&self, slot: u32, view: &TextureView) -> Result<()>
slot of binding 3: a storage texture (Layout::General when shaders use it)
Auto Trait Implementations§
impl !Freeze for Bindless
impl !RefUnwindSafe for Bindless
impl !UnwindSafe for Bindless
impl Forget for Bindless
impl Send for Bindless
impl Sync for Bindless
impl Unpin for Bindless
impl UnsafeUnpin for Bindless
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