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> DescriptorAllocator<B>where
B: Backend,
impl<B> DescriptorAllocator<B>where
B: Backend,
Sourcepub unsafe fn dispose(self, device: &B::Device)
pub unsafe fn dispose(self, device: &B::Device)
Destroy allocator instance. All sets allocated from this allocator become invalid.
Sourcepub unsafe fn allocate(
&mut self,
device: &B::Device,
layout: &B::DescriptorSetLayout,
layout_ranges: DescriptorRanges,
count: u32,
extend: &mut impl Extend<DescriptorSet<B>>,
) -> Result<(), OutOfMemory>
pub unsafe fn allocate( &mut self, device: &B::Device, layout: &B::DescriptorSetLayout, layout_ranges: DescriptorRanges, count: u32, extend: &mut impl Extend<DescriptorSet<B>>, ) -> Result<(), OutOfMemory>
Allocate descriptor set with specified layout.
DescriptorRanges
must match descriptor numbers of the layout.
DescriptorRanges
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§
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>where
<B as Backend>::DescriptorSet: RefUnwindSafe + UnwindSafe,
<B as Backend>::DescriptorPool: 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