[−][src]Struct rafx_resources::DynCommandPool
A helper that can be allocated as needed to create very short-lived command buffers. The object may not be persisted across frames. Instead, allocated a new one every frame. They are pooled, allocation is cheap and thread-safe.
This is designed for fire-and-forget command buffers. A DynCommandPool borrows a command pool that is not in use and not in flight, allocates out of it, resets itself after the appropriate number of frames pass, and returns itself to the pool for future reuse. See allocate_dyn_pool for more details
Implementations
impl DynCommandPool
[src]
pub fn allocate_dyn_command_buffer(
&mut self,
command_buffer_def: &RafxCommandBufferDef
) -> RafxResult<DynCommandBuffer>
[src]
&mut self,
command_buffer_def: &RafxCommandBufferDef
) -> RafxResult<DynCommandBuffer>
Allocate a command buffer and call begin() on it
pub fn pool(&mut self) -> &mut RafxCommandPool
[src]
Get the underlying pool within the allocator. The pool will be destroyed after MAX_FRAMES_IN_FLIGHT pass, and all command buffers created with it must follow the same restrictions as a command buffer created via begin_command_buffer/end_command_buffer. It's recommended to use begin_writing/end_writing as it is less error prone.
Trait Implementations
impl Drop for DynCommandPool
[src]
Auto Trait Implementations
impl RefUnwindSafe for DynCommandPool
[src]
impl Send for DynCommandPool
[src]
impl Sync for DynCommandPool
[src]
impl Unpin for DynCommandPool
[src]
impl UnwindSafe for DynCommandPool
[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, 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>,