Struct rafx_framework::DynCommandPoolAllocator[][src]

pub struct DynCommandPoolAllocator { /* fields omitted */ }

An allocator for DynCommandPools, objects that are short-lived and NOT persisted across frames. Meant for allocating command buffers that are usually single use and only for the current frame. The allocator is multi-thread friendly, but the pools themselves are not. So if writing command buffers from multiple threads, allocate a pool per thread.

Implementations

impl DynCommandPoolAllocator[src]

pub fn new(max_frames_in_flight: u32) -> Self[src]

Create an allocator for DynCommandPools.

pub fn allocate_dyn_pool(
    &self,
    queue: &RafxQueue,
    command_pool_def: &RafxCommandPoolDef,
    delay_submission_by_frame_count: u64
) -> RafxResult<DynCommandPool>
[src]

Allocates a pool. DynPools wrap CommandPools. The parameters match inputs for CommandPool::new. delay_submission_by_frame_count indicates how many frames will pass before the commands will be submitted (which affects how long-lived they will be). DO NOT submit command buffers earlier than this as the commands pools themselves are pooled and may be available to writing in future frames.

The common case for delay_submission_by_frame_count is to pass 0. You might pass 1 if for example, you are building a command buffer for frame N + 1 while frame N is not yet submitted.

pub fn on_frame_complete(&self) -> RafxResult<()>[src]

Call every frame to recycle command pools that are no-longer in flight

Trait Implementations

impl Clone for DynCommandPoolAllocator[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Downcast for T where
    T: Any

impl<T> DowncastSync for T where
    T: Send + Sync + Any

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Resource for T where
    T: Downcast + Send + Sync
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.