Module vulkano::descriptor_set::fixed_size_pool[][src]

Expand description

Pool of descriptor sets of a specific capacity 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.

use vulkano::descriptor_set::FixedSizeDescriptorSetsPool;
// use vulkano::pipeline::GraphicsPipelineAbstract;
// let graphics_pipeline: Arc<GraphicsPipelineAbstract> = ...;

let layout = graphics_pipeline.layout().descriptor_set_layouts().get(0).unwrap();
let pool = FixedSizeDescriptorSetsPool::new(layout.clone());

You would then typically store the pool in a struct for later. 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.

Structs

A descriptor set created from a FixedSizeDescriptorSetsPool.

Prototype of a FixedSizeDescriptorSet.

Same as FixedSizeDescriptorSetBuilder, but we’re in an array.

Pool of descriptor sets of a specific capacity that are automatically reclaimed.