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 as DescriptorSetAllocator>::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 as DescriptorSetAllocator>::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 as DescriptorSetAllocator>::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 as DescriptorSetAllocator>::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
layoutwas created for push descriptors rather than descriptor sets. - Panics if
variable_descriptor_countis 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,
Source§type Handle = DescriptorSet
type Handle = DescriptorSet
The type of the object.
Source§fn handle(&self) -> <PersistentDescriptorSet<P> as VulkanObject>::Handle
fn handle(&self) -> <PersistentDescriptorSet<P> as VulkanObject>::Handle
Returns the raw Vulkan handle of the object.
impl<P> Eq for PersistentDescriptorSet<P>where
P: DescriptorSetAlloc,
Auto Trait Implementations§
impl<P> Freeze for PersistentDescriptorSet<P>where
P: Freeze,
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