[−][src]Struct gfx_hal::pool::CommandPool
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.
Methods
impl<B: Backend, C> CommandPool<B, C>
[src]
pub unsafe fn new(raw: B::CommandPool) -> Self
[src]
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.
pub unsafe fn reset(&mut self, release_resources: bool)
[src]
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)
pub fn acquire_command_buffer<S: Shot>(&mut self) -> CommandBuffer<B, C, S>
[src]
Allocates a new primary command buffer from the pool.
pub fn acquire_secondary_command_buffer<S: Shot>(
&mut self
) -> SecondaryCommandBuffer<B, C, S>
[src]
&mut self
) -> SecondaryCommandBuffer<B, C, S>
Allocates a new secondary command buffer from the pool.
pub unsafe fn free<I>(&mut self, cmd_buffers: I) where
I: IntoIterator,
I::Item: IntoRawCommandBuffer<B, C>,
[src]
I: IntoIterator,
I::Item: IntoRawCommandBuffer<B, C>,
Free the given iterator of command buffers from the pool.
pub fn into_raw(self) -> B::CommandPool
[src]
Downgrade a typed command pool to untyped one.
impl<B: Backend, C: Supports<Graphics>> CommandPool<B, C>
[src]
pub fn acquire_subpass_command_buffer<S: Shot>(
&mut self
) -> SubpassCommandBuffer<B, S>
[src]
&mut self
) -> SubpassCommandBuffer<B, S>
Allocates a new subpass command buffer from the pool.
Trait Implementations
impl<B: Debug + Backend, C: Debug> Debug for CommandPool<B, C> where
B::CommandPool: Debug,
[src]
B::CommandPool: Debug,
Auto Trait Implementations
impl<B, C> Send for CommandPool<B, C> where
C: Send,
<B as Backend>::CommandPool: Send,
C: Send,
<B as Backend>::CommandPool: Send,
impl<B, C> Unpin for CommandPool<B, C> where
C: Unpin,
<B as Backend>::CommandPool: Unpin,
C: Unpin,
<B as Backend>::CommandPool: Unpin,
impl<B, C> Sync for CommandPool<B, C> where
C: Sync,
<B as Backend>::CommandPool: Sync,
C: Sync,
<B as Backend>::CommandPool: Sync,
impl<B, C> UnwindSafe for CommandPool<B, C> where
C: UnwindSafe,
<B as Backend>::CommandPool: UnwindSafe,
C: UnwindSafe,
<B as Backend>::CommandPool: UnwindSafe,
impl<B, C> RefUnwindSafe for CommandPool<B, C> where
C: RefUnwindSafe,
<B as Backend>::CommandPool: RefUnwindSafe,
C: RefUnwindSafe,
<B as Backend>::CommandPool: RefUnwindSafe,
Blanket Implementations
impl<T> Supports<T> for T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,