pub struct CommandPool { /* private fields */ }
Expand description

Represents a Vulkan command pool.

A command pool is always tied to a specific queue family. Command buffers allocated from a pool can only be executed on the corresponding queue family.

This struct doesn’t implement the Sync trait because Vulkan command pools are not thread safe. In other words, you can only use a pool from one thread at a time.

Implementations

Creates a new CommandPool.

Creates a new UnsafeCommandPool from a raw object handle.

Safety
  • handle must be a valid Vulkan object handle created from device.
  • create_info must match the info used to create the object.

Resets the pool, which resets all the command buffers that were allocated from it.

If release_resources is true, it is a hint to the implementation that it should free all the memory internally allocated for this pool.

Safety
  • The command buffers allocated from this pool jump to the initial state.

Allocates command buffers.

Frees individual command buffers.

Safety
  • The command_buffers must have been allocated from this pool.
  • The command_buffers must not be in the pending state.

Trims a command pool, which recycles unused internal memory from the command pool back to the system.

Command buffers allocated from the pool are not affected by trimming.

This function is supported only if the khr_maintenance1 extension is enabled on the device. Otherwise an error is returned. Since this operation is purely an optimization it is legitimate to call this function and simply ignore any possible error.

Returns the queue family on which command buffers of this pool can be executed.

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 default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
The type of the object.
Returns the raw Vulkan handle of 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.