Trait gfx_hal::pool::RawCommandPool
source · pub trait RawCommandPool<B: Backend>: Any + Send + Sync {
unsafe fn reset(&mut self);
unsafe fn free<I>(&mut self, buffers: I)
where
I: IntoIterator<Item = B::CommandBuffer>;
fn allocate_one(&mut self, level: RawLevel) -> B::CommandBuffer { ... }
fn allocate_vec(
&mut self,
num: usize,
level: RawLevel
) -> Vec<B::CommandBuffer> { ... }
}
Expand description
The allocated command buffers are associated with the creating command queue.
Required Methods
sourceunsafe fn reset(&mut self)
unsafe fn reset(&mut self)
Reset the command pool and the corresponding command buffers.
Synchronization: You may not free the pool if a command buffer is still in use (pool memory still in use)
sourceunsafe fn free<I>(&mut self, buffers: I)where
I: IntoIterator<Item = B::CommandBuffer>,
unsafe fn free<I>(&mut self, buffers: I)where
I: IntoIterator<Item = B::CommandBuffer>,
Free command buffers which are allocated from this pool.
Provided Methods
sourcefn allocate_one(&mut self, level: RawLevel) -> B::CommandBuffer
fn allocate_one(&mut self, level: RawLevel) -> B::CommandBuffer
Allocate a single command buffers from the pool.
sourcefn allocate_vec(&mut self, num: usize, level: RawLevel) -> Vec<B::CommandBuffer>
fn allocate_vec(&mut self, num: usize, level: RawLevel) -> Vec<B::CommandBuffer>
Allocate new command buffers from the pool.