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 explicitly. 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
Implementations
impl PersistentDescriptorSet<()>
[src]
impl PersistentDescriptorSet<()>
[src]pub fn start(
layout: Arc<UnsafeDescriptorSetLayout>
) -> PersistentDescriptorSetBuilder<()>
[src]
pub fn start(
layout: Arc<UnsafeDescriptorSetLayout>
) -> PersistentDescriptorSetBuilder<()>
[src]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,
R: PersistentDescriptorSetResources,
[src]
impl<R, P> DescriptorSet for PersistentDescriptorSet<R, P> where
P: DescriptorPoolAlloc,
R: PersistentDescriptorSetResources,
[src]fn inner(&self) -> &UnsafeDescriptorSet
[src]
fn inner(&self) -> &UnsafeDescriptorSet
[src]Returns the inner UnsafeDescriptorSet
.
fn num_buffers(&self) -> usize
[src]
fn num_buffers(&self) -> usize
[src]Returns the number of buffers within this descriptor set.
fn buffer(&self, index: usize) -> Option<(&dyn BufferAccess, u32)>
[src]
fn buffer(&self, index: usize) -> Option<(&dyn BufferAccess, u32)>
[src]Returns the index
th buffer of this descriptor set, or None
if out of range. Also
returns the index of the descriptor that uses this buffer. Read more
fn num_images(&self) -> usize
[src]
fn num_images(&self) -> usize
[src]Returns the number of images within this descriptor set.
impl<R, P> DescriptorSetDesc for PersistentDescriptorSet<R, P>
[src]
impl<R, P> DescriptorSetDesc for PersistentDescriptorSet<R, P>
[src]fn num_bindings(&self) -> usize
[src]
fn num_bindings(&self) -> usize
[src]Returns the number of binding slots in the set.
fn descriptor(&self, binding: usize) -> Option<DescriptorDesc>
[src]
fn descriptor(&self, binding: usize) -> Option<DescriptorDesc>
[src]Returns a description of a descriptor, or None
if out of range.
impl<R, P> DeviceOwned for PersistentDescriptorSet<R, P>
[src]
impl<R, P> DeviceOwned for PersistentDescriptorSet<R, P>
[src]impl<R, P> Hash for PersistentDescriptorSet<R, P> where
P: DescriptorPoolAlloc,
R: PersistentDescriptorSetResources,
[src]
impl<R, P> Hash for PersistentDescriptorSet<R, P> where
P: DescriptorPoolAlloc,
R: PersistentDescriptorSetResources,
[src]impl<R, P> PartialEq<PersistentDescriptorSet<R, P>> for PersistentDescriptorSet<R, P> where
P: DescriptorPoolAlloc,
R: PersistentDescriptorSetResources,
[src]
impl<R, P> PartialEq<PersistentDescriptorSet<R, P>> for PersistentDescriptorSet<R, P> where
P: DescriptorPoolAlloc,
R: PersistentDescriptorSetResources,
[src]impl<R, P> Eq for PersistentDescriptorSet<R, P> where
P: DescriptorPoolAlloc,
R: PersistentDescriptorSetResources,
[src]
P: DescriptorPoolAlloc,
R: PersistentDescriptorSetResources,
Auto Trait Implementations
impl<R, P> RefUnwindSafe for PersistentDescriptorSet<R, P> where
P: RefUnwindSafe,
R: RefUnwindSafe,
P: RefUnwindSafe,
R: RefUnwindSafe,
impl<R, P> Send for PersistentDescriptorSet<R, P> where
P: Send,
R: Send,
P: Send,
R: Send,
impl<R, P> Sync for PersistentDescriptorSet<R, P> where
P: Sync,
R: Sync,
P: Sync,
R: Sync,
impl<R, P> Unpin for PersistentDescriptorSet<R, P> where
P: Unpin,
R: Unpin,
P: Unpin,
R: Unpin,
impl<R, P> UnwindSafe for PersistentDescriptorSet<R, P> where
P: UnwindSafe,
R: UnwindSafe,
P: UnwindSafe,
R: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Content for T
[src]
impl<T> Content for T
[src]pub fn ref_from_ptr(*mut c_void, usize) -> Option<*mut T>
[src]
pub fn ref_from_ptr(*mut c_void, usize) -> Option<*mut T>
[src]Builds a pointer to this type from a raw pointer.
pub fn is_size_suitable(usize) -> bool
[src]
pub fn is_size_suitable(usize) -> bool
[src]Returns true if the size is suitable to store a type like this.
pub fn indiv_size() -> usize
[src]
pub fn indiv_size() -> usize
[src]Returns the size of an individual element.
impl<T> DescriptorSetsCollection for T where
T: DescriptorSet + Send + Sync + 'static,
[src]
impl<T> DescriptorSetsCollection for T where
T: DescriptorSet + Send + Sync + 'static,
[src]pub fn into_vec(
Self
) -> Vec<Box<dyn DescriptorSet + 'static + Sync + Send, Global>, Global>
[src]
Self
) -> Vec<Box<dyn DescriptorSet + 'static + Sync + Send, Global>, Global>
pub fn num_bindings_in_set(&Self, usize) -> Option<usize>
[src]
pub fn num_bindings_in_set(&Self, usize) -> Option<usize>
[src]Returns the number of descriptors in the set. Includes possibly empty descriptors. Read more
pub fn descriptor(&Self, usize, usize) -> Option<DescriptorDesc>
[src]
pub fn descriptor(&Self, usize, usize) -> Option<DescriptorDesc>
[src]Returns the descriptor for the given binding of the given set. Read more