command_buffer:: pool:: CommandPool
Types that manage the memory of command buffers.
A Vulkan command pool must be externally synchronized as if it owned the command buffers that were allocated from it. This includes allocating from the pool, freeing from the pool, resetting the pool or individual command buffers, and most importantly recording commands to command buffers.
The implementation of
CommandPool is expected to manage this. For as long as a
is alive, the trait implementation is expected to lock the pool that allocated the
for the current thread.
Note: This may be modified in the future to allow different implementation strategies.
The destructors of the
CommandPoolBuilderAlloc and the
CommandPoolAlloc are expected to
free the command buffer, reset the command buffer, or add it to a pool so that it gets reused.
If the implementation frees or resets the command buffer, it must not forget that this
operation must lock the pool.
type Builder: CommandPoolBuilderAlloc<Alloc = Self::Alloc>
Represents a command buffer that has been allocated and that is currently being built.
type Alloc: CommandPoolAlloc
Represents a command buffer that has been allocated and that is pending execution or is being executed.
Allocates command buffers from this pool.
Returns an iterator that contains an bunch of allocated command buffers.
fn queue_family(&self) -> QueueFamily
Returns the queue family that this pool targets.