Struct vulkano::descriptor::descriptor_set::PersistentDescriptorSet
[−]
[src]
pub struct PersistentDescriptorSet<R, P = StdDescriptorPoolAlloc> { /* fields omitted */ }
An immutable descriptor set that is expected to be long-lived.
Creating a persistent descriptor set allocates from a pool, and can't be modified once created. You are therefore encouraged to create them at initialization and not the during performance-critical paths.
Note: You can control of the pool that is used to create the descriptor set, if you wish so. By creating a implementation of the
DescriptorPool
trait that doesn't perform any actual allocation, you can skip this allocation and make it acceptable to use a persistent descriptor set in performance-critical paths..
The template parameter of the PersistentDescriptorSet
is complex, and you shouldn't try to
express it explicitely. If you want to store your descriptor set in a struct or in a Vec
for
example, you are encouraged to turn the PersistentDescriptorSet
into a Box<DescriptorSet>
or a Arc<DescriptorSet>
.
Example
Methods
impl PersistentDescriptorSet<()>
[src]
fn start<Pl>(
layout: Pl,
set_id: usize
) -> PersistentDescriptorSetBuilder<Pl, ()> where
Pl: PipelineLayoutAbstract,
layout: Pl,
set_id: usize
) -> PersistentDescriptorSetBuilder<Pl, ()> where
Pl: PipelineLayoutAbstract,
Starts the process of building a PersistentDescriptorSet
. Returns a builder.
Panic
- Panics if the set id is out of range.
Trait Implementations
impl<R, P> DescriptorSet for PersistentDescriptorSet<R, P> where
P: DescriptorPoolAlloc,
[src]
P: DescriptorPoolAlloc,
fn inner(&self) -> &UnsafeDescriptorSet
Returns the inner UnsafeDescriptorSet
.
fn buffers_list<'a>(&'a self) -> Box<Iterator<Item = &'a BufferAccess> + 'a>
Returns the list of buffers used by this descriptor set. Includes buffer views.
fn images_list<'a>(&'a self) -> Box<Iterator<Item = &'a ImageAccess> + 'a>
Returns the list of images used by this descriptor set. Includes image views.
impl<R, P> DescriptorSetDesc for PersistentDescriptorSet<R, P>
[src]
fn num_bindings(&self) -> usize
Returns the number of binding slots in the set.
fn descriptor(&self, binding: usize) -> Option<DescriptorDesc>
Returns a description of a descriptor, or None
if out of range.
impl<R, P> DeviceOwned for PersistentDescriptorSet<R, P> where
P: DeviceOwned,
[src]
P: DeviceOwned,