Struct vulkano::command_buffer::pool::UnsafeCommandPool
[−]
[src]
pub struct UnsafeCommandPool { /* fields omitted */ }
Low-level implementation of a command pool.
Methods
impl UnsafeCommandPool
[src]
fn new(device: &Arc<Device>, queue_family: QueueFamily, transient: bool, reset_cb: bool) -> Result<UnsafeCommandPool, OomError>
Creates a new pool.
The command buffers created with this pool can only be executed on queues of the given family.
Setting transient
to true is a hint to the implementation that the command buffers will
be short-lived.
Setting reset_cb
to true means that command buffers can be reset individually.
Panic
- Panics if the queue family doesn't belong to the same physical device as
device
.
unsafe fn reset(&self, release_resources: bool) -> Result<(), OomError>
Resets the pool, which resets all the command buffers that were allocated from it.
Safety
The command buffers allocated from this pool jump to the initial state.
fn alloc_command_buffers(&self, secondary: bool, count: usize) -> Result<UnsafeCommandPoolAllocIter, OomError>
Allocates count
command buffers.
If secondary
is true, allocates secondary command buffers. Otherwise, allocates primary
command buffers.
unsafe fn free_command_buffers<I>(&self, command_buffers: I) where I: Iterator<Item=AllocatedCommandBuffer>
Frees individual command buffers.
Safety
The command buffers must have been allocated from this pool.
fn device(&self) -> &Arc<Device>
Returns the device this command pool was created with.
fn queue_family(&self) -> QueueFamily
Returns the queue family on which command buffers of this pool can be executed.
Trait Implementations
impl Send for UnsafeCommandPool
[src]
impl VulkanObject for UnsafeCommandPool
[src]
type Object = CommandPool
The type of the object.
fn internal_object(&self) -> CommandPool
Returns a reference to the object.