Struct gfx_hal::pool::CommandPool

source ·
pub struct CommandPool<B: Backend, C> { /* private fields */ }
Expand description

Strong-typed command pool.

This a safer wrapper around RawCommandPool which ensures that only one command buffer is recorded at the same time from the current queue. Command buffers are stored internally and can only be obtained via a strong-typed CommandBuffer wrapper for encoding.

Implementations

Create typed command pool from raw.

Safety

<C as Capability>::supported_by(queue_type) must return true for queue_type being the type of queues from family this raw pool is associated with.

Get a primary command buffer for recording.

You can only record to one command buffer per pool at the same time. If more command buffers are requested than allocated, new buffers will be reserved. The command buffer will be returned in ‘recording’ state.

Get a secondary command buffer for recording.

You can only record to one command buffer per pool at the same time. If more command buffers are requested than allocated, new buffers will be reserved. The command buffer will be returned in ‘recording’ state.

Free the given iterator of command buffers from the pool.

Downgrade a typed command pool to untyped one, free up the allocated command buffers.

Get a subpass command buffer for recording.

You can only record to one command buffer per pool at the same time. If more command buffers are requested than allocated, new buffers will be reserved. The command buffer will be returned in ‘recording’ state.

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.