Struct rafx_framework::DynCommandPoolAllocator [−][src]
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]
&self,
queue: &RafxQueue,
command_pool_def: &RafxCommandPoolDef,
delay_submission_by_frame_count: u64
) -> RafxResult<DynCommandPool>
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]
fn clone(&self) -> DynCommandPoolAllocator
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
Auto Trait Implementations
impl RefUnwindSafe for DynCommandPoolAllocator
[src]
impl Send for DynCommandPoolAllocator
[src]
impl Sync for DynCommandPoolAllocator
[src]
impl Unpin for DynCommandPoolAllocator
[src]
impl UnwindSafe for DynCommandPoolAllocator
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Downcast for T where
T: Any,
T: Any,
pub fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn as_any(&self) -> &(dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
impl<T> DowncastSync for T where
T: Send + Sync + Any,
T: Send + Sync + Any,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Resource for T where
T: Downcast + Send + Sync,
[src]
T: Downcast + Send + Sync,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
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.
pub 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>,