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

source

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.

source

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 given layout.

Trait Implementations§

source§

impl<P> DescriptorSet for PersistentDescriptorSet<P>where P: DescriptorSetAlloc,

source§

fn alloc(&self) -> &DescriptorPoolAlloc

Returns the allocation of the descriptor set.
source§

fn pool(&self) -> &DescriptorPool

Returns the descriptor pool that the descriptor set was allocated from.
source§

fn resources(&self) -> &DescriptorSetResources

Returns the resources bound to this descriptor set.
source§

fn layout(&self) -> &Arc<DescriptorSetLayout>

Returns the layout of this descriptor set.
source§

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,

Creates a DescriptorSetWithOffsets with the given dynamic offsets.
source§

impl<P> DeviceOwned for PersistentDescriptorSet<P>where P: DescriptorSetAlloc,

source§

fn device(&self) -> &Arc<Device>

Returns the device that owns self.
source§

impl<P> Hash for PersistentDescriptorSet<P>where P: DescriptorSetAlloc,

source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl<P> PartialEq for PersistentDescriptorSet<P>where P: DescriptorSetAlloc,

source§

fn eq(&self, other: &Self) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<P> VulkanObject for PersistentDescriptorSet<P>where P: DescriptorSetAlloc,

§

type Handle = DescriptorSet

The type of the object.
source§

fn handle(&self) -> Self::Handle

Returns the raw Vulkan handle of the object.
source§

impl<P> Eq for PersistentDescriptorSet<P>where P: DescriptorSetAlloc,

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> DeviceOwnedVulkanObject for Twhere T: DeviceOwned + VulkanObject,

source§

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
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.