Struct vulkano::descriptor::descriptor_set::UnsafeDescriptorPool [] [src]

pub struct UnsafeDescriptorPool { /* fields omitted */ }

Pool from which descriptor sets 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.

Methods

impl UnsafeDescriptorPool
[src]

[src]

Initializes a new pool.

Initializes a pool whose capacity is given by count and max_sets. At most count descriptors or max_sets descriptor sets can be allocated at once with this pool.

If free_descriptor_set_bit is true, then individual descriptor sets can be free'd from the pool. Otherwise you must reset or destroy the whole pool at once.

Panic

  • Panics if all the descriptors count are 0.
  • Panics if max_sets is 0.

[src]

Allocates descriptor sets from the pool, one for each layout. 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.

[src]

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.

[src]

Resets the pool.

This destroys all descriptor sets and empties the pool.

Trait Implementations

impl DeviceOwned for UnsafeDescriptorPool
[src]

[src]

Returns the device that owns Self.

impl Debug for UnsafeDescriptorPool
[src]

[src]

Formats the value using the given formatter.

impl Drop for UnsafeDescriptorPool
[src]

[src]

Executes the destructor for this type. Read more