pub struct DescriptorAllocator<B: Backend> { /* private fields */ }
Expand description
Descriptor allocator. Can be used to allocate descriptor sets for any layout.
Implementations§
Source§impl<B: Backend> DescriptorAllocator<B>
impl<B: Backend> DescriptorAllocator<B>
Sourcepub fn allocate(
&mut self,
device: &B::Device,
layout: &B::DescriptorSetLayout,
layout_counts: &DescriptorCounts,
count: u32,
extend: &mut impl Extend<DescriptorSet<B>>,
) -> Result<(), OutOfMemory>
pub fn allocate( &mut self, device: &B::Device, layout: &B::DescriptorSetLayout, layout_counts: &DescriptorCounts, count: u32, extend: &mut impl Extend<DescriptorSet<B>>, ) -> Result<(), OutOfMemory>
Allocate descriptor set with specified layout.
DescriptorCounts
must match descriptor numbers of the layout.
DescriptorCounts
can be constructed from bindings that were used
to create layout instance.
Sourcepub unsafe fn free(
&mut self,
all_sets: impl IntoIterator<Item = DescriptorSet<B>>,
)
pub unsafe fn free( &mut self, all_sets: impl IntoIterator<Item = DescriptorSet<B>>, )
Free descriptor sets.
§Safety
None of descriptor sets can be referenced in any pending command buffers. All command buffers where at least one of descriptor sets referenced move to invalid state.
Trait Implementations§
Source§impl<B: Debug + Backend> Debug for DescriptorAllocator<B>where
B::DescriptorSet: Debug,
impl<B: Debug + Backend> Debug for DescriptorAllocator<B>where
B::DescriptorSet: Debug,
Auto Trait Implementations§
impl<B> Freeze for DescriptorAllocator<B>
impl<B> RefUnwindSafe for DescriptorAllocator<B>
impl<B> Send for DescriptorAllocator<B>
impl<B> Sync for DescriptorAllocator<B>
impl<B> Unpin for DescriptorAllocator<B>
impl<B> UnwindSafe for DescriptorAllocator<B>
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