[−][src]Struct vulkano::descriptor::descriptor_set::FixedSizeDescriptorSetsPool
Pool of descriptor sets of a specific capacity and that are automatically reclaimed.
You are encouraged to use this type when you need a different descriptor set at each frame, or regularly during the execution.
Example
At initialization, create a FixedSizeDescriptorSetsPool. The first parameter of the new
function can be a graphics pipeline, a compute pipeline, or anything that represents a pipeline
layout.
use vulkano::descriptor::descriptor_set::FixedSizeDescriptorSetsPool; // use vulkano::pipeline::GraphicsPipelineAbstract; // let graphics_pipeline: Arc<GraphicsPipelineAbstract> = ...; let pool = FixedSizeDescriptorSetsPool::new(graphics_pipeline.clone(), 0);
You would then typically store the pool in a struct for later. Its type is
FixedSizeDescriptorSetsPool<T> where T is the type of what was passed to new(). In the
example above, it would be FixedSizeDescriptorSetsPool<Arc<GraphicsPipelineAbstract>>.
Then whenever you need a descriptor set, call pool.next() to start the process of building
it.
let descriptor_set = pool.next() //.add_buffer(...) //.add_sampled_image(...) .build().unwrap();
Note that next() requires exclusive (mut) access to the pool. You can use a Mutex around
the pool if you can't provide this.
Implementations
impl<L> FixedSizeDescriptorSetsPool<L>[src]
pub fn new(layout: L, set_id: usize) -> FixedSizeDescriptorSetsPool<L> where
L: PipelineLayoutAbstract, [src]
L: PipelineLayoutAbstract,
Initializes a new pool. The pool is configured to allocate sets that corresponds to the parameters passed to this function.
pub fn next(&mut self) -> FixedSizeDescriptorSetBuilder<'_, L, ()> where
L: PipelineLayoutAbstract + Clone, [src]
L: PipelineLayoutAbstract + Clone,
Starts the process of building a new descriptor set.
The set will corresponds to the set layout that was passed to new.
Trait Implementations
impl<L: Clone> Clone for FixedSizeDescriptorSetsPool<L>[src]
fn clone(&self) -> FixedSizeDescriptorSetsPool<L>[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
Auto Trait Implementations
impl<L> RefUnwindSafe for FixedSizeDescriptorSetsPool<L> where
L: RefUnwindSafe,
L: RefUnwindSafe,
impl<L> Send for FixedSizeDescriptorSetsPool<L> where
L: Send,
L: Send,
impl<L> Sync for FixedSizeDescriptorSetsPool<L> where
L: Sync,
L: Sync,
impl<L> Unpin for FixedSizeDescriptorSetsPool<L> where
L: Unpin,
L: Unpin,
impl<L> UnwindSafe for FixedSizeDescriptorSetsPool<L> where
L: UnwindSafe,
L: 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,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Content for T[src]
fn ref_from_ptr(*mut c_void, usize) -> Option<*mut T>[src]
fn is_size_suitable(usize) -> bool[src]
fn indiv_size() -> usize[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> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
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.
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>,