pub trait DescriptorPool<B>:
Send
+ Sync
+ Debugwhere
B: Backend,{
// Required methods
unsafe fn free_sets<I>(&mut self, descriptor_sets: I)
where I: IntoIterator<Item = <B as Backend>::DescriptorSet>;
unsafe fn reset(&mut self);
// Provided methods
unsafe fn allocate_set(
&mut self,
layout: &<B as Backend>::DescriptorSetLayout,
) -> Result<<B as Backend>::DescriptorSet, AllocationError> { ... }
unsafe fn allocate_sets<I>(
&mut self,
layouts: I,
sets: &mut SmallVec<[<B as Backend>::DescriptorSet; 1]>,
) -> Result<(), AllocationError>
where I: IntoIterator,
<I as IntoIterator>::Item: Borrow<<B as Backend>::DescriptorSetLayout> { ... }
}
Expand description
A descriptor pool is a collection of memory from which descriptor sets are allocated.
Required Methods§
Provided Methods§
Sourceunsafe fn allocate_set(
&mut self,
layout: &<B as Backend>::DescriptorSetLayout,
) -> Result<<B as Backend>::DescriptorSet, AllocationError>
unsafe fn allocate_set( &mut self, layout: &<B as Backend>::DescriptorSetLayout, ) -> Result<<B as Backend>::DescriptorSet, AllocationError>
Allocate a descriptor set from the pool.
The descriptor set will be allocated from the pool according to the corresponding set layout. However,
specific descriptors must still be written to the set before use using a DescriptorSetWrite
or
DescriptorSetCopy
.
Descriptors will become invalid once the pool is reset. Usage of invalidated descriptor sets results in undefined behavior.
Sourceunsafe fn allocate_sets<I>(
&mut self,
layouts: I,
sets: &mut SmallVec<[<B as Backend>::DescriptorSet; 1]>,
) -> Result<(), AllocationError>
unsafe fn allocate_sets<I>( &mut self, layouts: I, sets: &mut SmallVec<[<B as Backend>::DescriptorSet; 1]>, ) -> Result<(), AllocationError>
Allocate one or multiple descriptor sets from the pool.
The descriptor set will be allocated from the pool according to the corresponding set layout. However,
specific descriptors must still be written to the set before use using a DescriptorSetWrite
or
DescriptorSetCopy
.
Each descriptor set will be allocated from the pool according to the corresponding set layout. Descriptors will become invalid once the pool is reset. Usage of invalidated descriptor sets results in undefined behavior.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.