Trait vulkano::command_buffer::pool::CommandPool [] [src]

pub unsafe trait CommandPool {
    type Iter: Iterator<Item=AllocatedCommandBuffer>;
    type Lock;
    type Finished: CommandPoolFinished;
    fn alloc(&self, secondary: bool, count: u32) -> Result<Self::Iter, OomError>;
    unsafe fn free<I>(&self, secondary: bool, command_buffers: I) where I: Iterator<Item=AllocatedCommandBuffer>;
    fn finish(self) -> Self::Finished;
    fn lock(&self) -> Self::Lock;
    fn can_reset_invidual_command_buffers(&self) -> bool;
    fn device(&self) -> &Arc<Device>;
    fn queue_family(&self) -> QueueFamily;
}

Types that manage the memory of command buffers.

Associated Types

See alloc().

See lock().

See finish().

Required Methods

Allocates command buffers from this pool.

Frees command buffers from this pool.

Safety

  • The command buffers must have been allocated from this pool.
  • secondary must have the same value as what was passed to alloc.

Once a command buffer has finished being built, it should call this method in order to produce a Finished object.

The Finished object must hold the pool alive.

The point of this object is to change the Send/Sync strategy after a command buffer has finished being built compared to before.

Before any command buffer allocated from this pool can be modified, the pool itself must be locked by calling this method.

All the operations are atomic at the thread level, so the point of this lock is to prevent the pool from being accessed from multiple threads in parallel.

Returns true if command buffers can be reset individually. In other words, if the pool was created with reset_cb set to true.

Returns the device used to create this pool.

Returns the queue family that this pool targets.

Implementors