logo
pub struct UnsafeDescriptorPool { /* private fields */ }
Expand description

Pool that descriptors are allocated from.

A pool has a maximum number of descriptor sets and a maximum number of descriptors (one value per descriptor type) it can allocate.

Implementations

Creates a new UnsafeDescriptorPool.

Panics
  • Panics if create_info.max_sets is 0.
  • Panics if create_info.pool_sizes is empty.
  • Panics if create_info.pool_sizes contains a descriptor type with a count of 0.

Returns the maximum number of sets that can be allocated from the pool.

Returns the number of descriptors of each type that the pool was created with.

Returns whether the descriptor sets allocated from the pool can be individually freed.

Allocates descriptor sets from the pool, one for each element in create_info. Returns an iterator to the allocated sets, or an error.

The FragmentedPool errors often can’t be prevented. If the function returns this error, you should just create a new pool.

Panic
  • Panics if one of the layouts wasn’t created with the same device as the pool.
Safety

See also the new function.

  • The total descriptors of the layouts must fit in the pool.
  • The total number of descriptor sets allocated from the pool must not overflow the pool.
  • You must ensure that the allocated descriptor sets are no longer in use when the pool is destroyed, as destroying the pool is equivalent to freeing all the sets.

Frees some descriptor sets.

Note that it is not mandatory to free sets. Destroying or resetting the pool destroys all the descriptor sets.

Safety
  • The pool must have been created with free_descriptor_set_bit set to true.
  • The descriptor sets must have been allocated from the pool.
  • The descriptor sets must not be free’d twice.
  • The descriptor sets must not be in use by the GPU.

Resets the pool.

This destroys all descriptor sets and empties the pool.

Trait Implementations

Formats the value using the given formatter. Read more

Returns the device that owns Self.

Executes the destructor for this type. Read more

Feeds this value into the given Hasher. Read more

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

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

The type of the object.

Returns a reference to the object.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.