Struct rafx_framework::DynCommandPool [−][src]
pub struct DynCommandPool { /* fields omitted */ }
Expand description
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]
impl DynCommandPool
[src]pub fn allocate_dyn_command_buffer(
&mut self,
command_buffer_def: &RafxCommandBufferDef
) -> RafxResult<DynCommandBuffer>
[src]
pub fn allocate_dyn_command_buffer(
&mut self,
command_buffer_def: &RafxCommandBufferDef
) -> RafxResult<DynCommandBuffer>
[src]Allocate a command buffer and call begin() on it
pub fn pool(&mut self) -> &mut RafxCommandPool
[src]
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
Auto Trait Implementations
impl RefUnwindSafe for DynCommandPool
impl Send for DynCommandPool
impl Sync for DynCommandPool
impl Unpin for DynCommandPool
impl UnwindSafe for DynCommandPool
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Downcast for T where
T: Any,
[src]
impl<T> Downcast for T where
T: Any,
[src]pub fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
[src]
pub fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
[src]Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read more
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
[src]
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
[src]Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
pub fn as_any(&self) -> &(dyn Any + 'static)
[src]
pub fn as_any(&self) -> &(dyn Any + 'static)
[src]Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
[src]
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
[src]Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more
impl<T> DowncastSync for T where
T: Any + Send + Sync,
[src]
impl<T> DowncastSync for T where
T: Any + Send + Sync,
[src]impl<T> Resource for T where
T: Downcast + Send + Sync,
[src]
T: Downcast + Send + Sync,