Struct gpu_descriptor::DescriptorAllocator [−][src]
pub struct DescriptorAllocator<P, S> { /* fields omitted */ }
Descriptor allocator. Can be used to allocate descriptor sets for any layout.
Implementations
impl<P, S> DescriptorAllocator<P, S>
[src]
impl<P, S> DescriptorAllocator<P, S>
[src]pub fn new(max_update_after_bind_descriptors_in_all_pools: u32) -> Self
[src]
Create new allocator instance.
pub unsafe fn allocate<L, D>(
&mut self,
device: &D,
layout: &L,
flags: DescriptorSetLayoutCreateFlags,
layout_descriptor_count: &DescriptorTotalCount,
count: u32
) -> Result<Vec<DescriptorSet<S>>, AllocationError> where
S: Debug,
L: Debug,
D: DescriptorDevice<L, P, S>,
[src]
&mut self,
device: &D,
layout: &L,
flags: DescriptorSetLayoutCreateFlags,
layout_descriptor_count: &DescriptorTotalCount,
count: u32
) -> Result<Vec<DescriptorSet<S>>, AllocationError> where
S: Debug,
L: Debug,
D: DescriptorDevice<L, P, S>,
Allocate descriptor set with specified layout.
Safety
- Same
device
instance must be passed to all method calls of oneDescriptorAllocator
instance. flags
must match flags that were used to create the layout.layout_descriptor_count
must match descriptor numbers in the layout.
pub unsafe fn free<L, D, I>(&mut self, device: &D, sets: I) where
D: DescriptorDevice<L, P, S>,
I: IntoIterator<Item = DescriptorSet<S>>,
[src]
D: DescriptorDevice<L, P, S>,
I: IntoIterator<Item = DescriptorSet<S>>,
Free descriptor sets.
Safety
- Same
device
instance must be passed to all method calls of oneDescriptorAllocator
instance. - 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.
pub unsafe fn cleanup<L>(&mut self, device: &impl DescriptorDevice<L, P, S>)
[src]
Perform cleanup to allow resources reuse.
Safety
- Same
device
instance must be passed to all method calls of oneDescriptorAllocator
instance.
Trait Implementations
impl<P: Debug, S: Debug> Debug for DescriptorAllocator<P, S>
[src]
impl<P: Debug, S: Debug> Debug for DescriptorAllocator<P, S>
[src]impl<P, S> Drop for DescriptorAllocator<P, S>
[src]
impl<P, S> Drop for DescriptorAllocator<P, S>
[src]Auto Trait Implementations
impl<P, S> RefUnwindSafe for DescriptorAllocator<P, S> where
P: RefUnwindSafe,
S: RefUnwindSafe,
impl<P, S> RefUnwindSafe for DescriptorAllocator<P, S> where
P: RefUnwindSafe,
S: RefUnwindSafe,
impl<P, S> Send for DescriptorAllocator<P, S> where
P: Send,
S: Send,
impl<P, S> Send for DescriptorAllocator<P, S> where
P: Send,
S: Send,
impl<P, S> Sync for DescriptorAllocator<P, S> where
P: Sync,
S: Sync,
impl<P, S> Sync for DescriptorAllocator<P, S> where
P: Sync,
S: Sync,
impl<P, S> Unpin for DescriptorAllocator<P, S> where
P: Unpin,
S: Unpin,
impl<P, S> Unpin for DescriptorAllocator<P, S> where
P: Unpin,
S: Unpin,
impl<P, S> UnwindSafe for DescriptorAllocator<P, S> where
P: UnwindSafe,
S: UnwindSafe,
impl<P, S> UnwindSafe for DescriptorAllocator<P, S> where
P: UnwindSafe,
S: UnwindSafe,