Struct vulkano::descriptor_set::persistent::PersistentDescriptorSet
source · pub struct PersistentDescriptorSet<P = StandardDescriptorSetAlloc> { /* private fields */ }
Expand description
A simple, immutable descriptor set that is expected to be long-lived.
Implementations§
source§impl PersistentDescriptorSet
impl PersistentDescriptorSet
sourcepub fn new<A>(
allocator: &A,
layout: Arc<DescriptorSetLayout>,
descriptor_writes: impl IntoIterator<Item = WriteDescriptorSet>,
descriptor_copies: impl IntoIterator<Item = CopyDescriptorSet>
) -> Result<Arc<PersistentDescriptorSet<A::Alloc>>, Validated<VulkanError>>where
A: DescriptorSetAllocator + ?Sized,
pub fn new<A>( allocator: &A, layout: Arc<DescriptorSetLayout>, descriptor_writes: impl IntoIterator<Item = WriteDescriptorSet>, descriptor_copies: impl IntoIterator<Item = CopyDescriptorSet> ) -> Result<Arc<PersistentDescriptorSet<A::Alloc>>, Validated<VulkanError>>where A: DescriptorSetAllocator + ?Sized,
Creates and returns a new descriptor set with a variable descriptor count of 0.
See new_with_pool
for more.
sourcepub fn new_variable<A>(
allocator: &A,
layout: Arc<DescriptorSetLayout>,
variable_descriptor_count: u32,
descriptor_writes: impl IntoIterator<Item = WriteDescriptorSet>,
descriptor_copies: impl IntoIterator<Item = CopyDescriptorSet>
) -> Result<Arc<PersistentDescriptorSet<A::Alloc>>, Validated<VulkanError>>where
A: DescriptorSetAllocator + ?Sized,
pub fn new_variable<A>( allocator: &A, layout: Arc<DescriptorSetLayout>, variable_descriptor_count: u32, descriptor_writes: impl IntoIterator<Item = WriteDescriptorSet>, descriptor_copies: impl IntoIterator<Item = CopyDescriptorSet> ) -> Result<Arc<PersistentDescriptorSet<A::Alloc>>, Validated<VulkanError>>where A: DescriptorSetAllocator + ?Sized,
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§
source§impl<P> DescriptorSet for PersistentDescriptorSet<P>where
P: DescriptorSetAlloc,
impl<P> DescriptorSet for PersistentDescriptorSet<P>where P: DescriptorSetAlloc,
source§fn alloc(&self) -> &DescriptorPoolAlloc
fn alloc(&self) -> &DescriptorPoolAlloc
Returns the allocation of the descriptor set.
source§fn pool(&self) -> &DescriptorPool
fn pool(&self) -> &DescriptorPool
Returns the descriptor pool that the descriptor set was allocated from.
source§fn resources(&self) -> &DescriptorSetResources
fn resources(&self) -> &DescriptorSetResources
Returns the resources bound to this descriptor set.
source§fn layout(&self) -> &Arc<DescriptorSetLayout>
fn layout(&self) -> &Arc<DescriptorSetLayout>
Returns the layout of this descriptor set.
source§fn variable_descriptor_count(&self) -> u32
fn variable_descriptor_count(&self) -> u32
Returns the variable descriptor count that this descriptor set was allocated with.
source§fn offsets(
self: Arc<Self>,
dynamic_offsets: impl IntoIterator<Item = u32>
) -> DescriptorSetWithOffsetswhere
Self: Sized + 'static,
fn offsets( self: Arc<Self>, dynamic_offsets: impl IntoIterator<Item = u32> ) -> DescriptorSetWithOffsetswhere Self: Sized + 'static,
Creates a
DescriptorSetWithOffsets
with the given dynamic offsets.source§impl<P> DeviceOwned for PersistentDescriptorSet<P>where
P: DescriptorSetAlloc,
impl<P> DeviceOwned for PersistentDescriptorSet<P>where P: DescriptorSetAlloc,
source§impl<P> Hash for PersistentDescriptorSet<P>where
P: DescriptorSetAlloc,
impl<P> Hash for PersistentDescriptorSet<P>where P: DescriptorSetAlloc,
source§impl<P> PartialEq for PersistentDescriptorSet<P>where
P: DescriptorSetAlloc,
impl<P> PartialEq for PersistentDescriptorSet<P>where P: DescriptorSetAlloc,
source§impl<P> VulkanObject for PersistentDescriptorSet<P>where
P: DescriptorSetAlloc,
impl<P> VulkanObject for PersistentDescriptorSet<P>where P: DescriptorSetAlloc,
impl<P> Eq for PersistentDescriptorSet<P>where P: DescriptorSetAlloc,
Auto Trait Implementations§
impl<P = StandardDescriptorSetAlloc> !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 = StandardDescriptorSetAlloc> !UnwindSafe for PersistentDescriptorSet<P>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> DeviceOwnedVulkanObject for Twhere
T: DeviceOwned + VulkanObject,
impl<T> DeviceOwnedVulkanObject for Twhere T: DeviceOwned + VulkanObject,
source§fn set_debug_utils_object_name(
&self,
object_name: Option<&str>
) -> Result<(), VulkanError>
fn set_debug_utils_object_name( &self, object_name: Option<&str> ) -> Result<(), VulkanError>
Assigns a human-readable name to the object for debugging purposes. Read more