Struct vulkano::descriptor_set::persistent::PersistentDescriptorSet
source · [−]pub struct PersistentDescriptorSet<P = StdDescriptorPoolAlloc> { /* private fields */ }
Expand description
A simple, immutable descriptor set that is expected to be long-lived.
Implementations
sourceimpl PersistentDescriptorSet
impl PersistentDescriptorSet
sourcepub fn new(
layout: Arc<DescriptorSetLayout>,
descriptor_writes: impl IntoIterator<Item = WriteDescriptorSet>
) -> Result<Arc<PersistentDescriptorSet>, DescriptorSetCreationError>
pub fn new(
layout: Arc<DescriptorSetLayout>,
descriptor_writes: impl IntoIterator<Item = WriteDescriptorSet>
) -> Result<Arc<PersistentDescriptorSet>, DescriptorSetCreationError>
Creates and returns a new descriptor set with a variable descriptor count of 0.
See new_with_pool
for more.
sourcepub fn new_variable(
layout: Arc<DescriptorSetLayout>,
variable_descriptor_count: u32,
descriptor_writes: impl IntoIterator<Item = WriteDescriptorSet>
) -> Result<Arc<PersistentDescriptorSet>, DescriptorSetCreationError>
pub fn new_variable(
layout: Arc<DescriptorSetLayout>,
variable_descriptor_count: u32,
descriptor_writes: impl IntoIterator<Item = WriteDescriptorSet>
) -> Result<Arc<PersistentDescriptorSet>, DescriptorSetCreationError>
Creates and returns a new descriptor set with the requested variable descriptor count.
See new_with_pool
for more.
sourcepub fn new_with_pool<P>(
layout: Arc<DescriptorSetLayout>,
variable_descriptor_count: u32,
pool: &mut P,
descriptor_writes: impl IntoIterator<Item = WriteDescriptorSet>
) -> Result<Arc<PersistentDescriptorSet<P::Alloc>>, DescriptorSetCreationError> where
P: ?Sized + DescriptorPool,
pub fn new_with_pool<P>(
layout: Arc<DescriptorSetLayout>,
variable_descriptor_count: u32,
pool: &mut P,
descriptor_writes: impl IntoIterator<Item = WriteDescriptorSet>
) -> Result<Arc<PersistentDescriptorSet<P::Alloc>>, DescriptorSetCreationError> where
P: ?Sized + DescriptorPool,
Creates and returns a new descriptor set with the requested variable descriptor count, allocating it from the provided pool.
Panics
- Panics if
layout
was created for push descriptors rather than descriptor sets. - Panics if
variable_descriptor_count
is too large for the givenlayout
.
Trait Implementations
sourceimpl<P> DescriptorSet for PersistentDescriptorSet<P> where
P: DescriptorPoolAlloc,
impl<P> DescriptorSet for PersistentDescriptorSet<P> where
P: DescriptorPoolAlloc,
sourcefn inner(&self) -> &UnsafeDescriptorSet
fn inner(&self) -> &UnsafeDescriptorSet
Returns the inner UnsafeDescriptorSet
.
sourcefn layout(&self) -> &Arc<DescriptorSetLayout>
fn layout(&self) -> &Arc<DescriptorSetLayout>
Returns the layout of this descriptor set.
sourcefn resources(&self) -> &DescriptorSetResources
fn resources(&self) -> &DescriptorSetResources
Returns the resources bound to this descriptor set.
sourcefn offsets<I>(self: Arc<Self>, dynamic_offsets: I) -> DescriptorSetWithOffsets where
Self: Sized + 'static,
I: IntoIterator<Item = u32>,
fn offsets<I>(self: Arc<Self>, dynamic_offsets: I) -> DescriptorSetWithOffsets where
Self: Sized + 'static,
I: IntoIterator<Item = u32>,
Creates a DescriptorSetWithOffsets
with the given dynamic offsets.
sourceimpl<P> DeviceOwned for PersistentDescriptorSet<P> where
P: DescriptorPoolAlloc,
impl<P> DeviceOwned for PersistentDescriptorSet<P> where
P: DescriptorPoolAlloc,
sourceimpl<P> Hash for PersistentDescriptorSet<P> where
P: DescriptorPoolAlloc,
impl<P> Hash for PersistentDescriptorSet<P> where
P: DescriptorPoolAlloc,
sourceimpl<P> PartialEq<PersistentDescriptorSet<P>> for PersistentDescriptorSet<P> where
P: DescriptorPoolAlloc,
impl<P> PartialEq<PersistentDescriptorSet<P>> for PersistentDescriptorSet<P> where
P: DescriptorPoolAlloc,
impl<P> Eq for PersistentDescriptorSet<P> where
P: DescriptorPoolAlloc,
Auto Trait Implementations
impl<P = StdDescriptorPoolAlloc> !RefUnwindSafe for PersistentDescriptorSet<P>
impl<P> Send for PersistentDescriptorSet<P> where
P: Send,
impl<P> Sync for PersistentDescriptorSet<P> where
P: Sync,
impl<P> Unpin for PersistentDescriptorSet<P> where
P: Unpin,
impl<P = StdDescriptorPoolAlloc> !UnwindSafe for PersistentDescriptorSet<P>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more