Struct gpu_descriptor::DescriptorAllocator [−][src]
Descriptor allocator. Can be used to allocate descriptor sets for any layout.
Implementations
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: Debug>(
&mut self,
device: &impl DescriptorDevice<L, P, S>,
layout: &L,
flags: DescriptorSetLayoutCreateFlags,
layout_descriptor_count: &DescriptorTotalCount,
count: u32
) -> Result<Vec<DescriptorSet<S>>, AllocationError> where
S: Debug,
[src]
&mut self,
device: &impl DescriptorDevice<L, P, S>,
layout: &L,
flags: DescriptorSetLayoutCreateFlags,
layout_descriptor_count: &DescriptorTotalCount,
count: u32
) -> Result<Vec<DescriptorSet<S>>, AllocationError> where
S: Debug,
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>(
&mut self,
device: &impl DescriptorDevice<L, P, S>,
sets: impl IntoIterator<Item = DescriptorSet<S>>
)
[src]
&mut self,
device: &impl DescriptorDevice<L, P, S>,
sets: impl 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, S> Drop for DescriptorAllocator<P, S>
[src]
Auto Trait Implementations
impl<P, S> RefUnwindSafe for DescriptorAllocator<P, S> where
P: RefUnwindSafe,
S: RefUnwindSafe,
[src]
P: RefUnwindSafe,
S: RefUnwindSafe,
impl<P, S> Send for DescriptorAllocator<P, S> where
P: Send,
S: Send,
[src]
P: Send,
S: Send,
impl<P, S> Sync for DescriptorAllocator<P, S> where
P: Sync,
S: Sync,
[src]
P: Sync,
S: Sync,
impl<P, S> Unpin for DescriptorAllocator<P, S> where
P: Unpin,
S: Unpin,
[src]
P: Unpin,
S: Unpin,
impl<P, S> UnwindSafe for DescriptorAllocator<P, S> where
P: UnwindSafe,
S: UnwindSafe,
[src]
P: UnwindSafe,
S: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,