#[repr(u32)]pub enum CommandBufferUsage {
OneTimeSubmit = 1,
MultipleSubmit = 0,
SimultaneousUse = 4,
}
Expand description
Usage flags to pass when creating a command buffer.
The safest option is SimultaneousUse
, but it may be slower than the other two.
Variants§
OneTimeSubmit = 1
The command buffer can only be submitted once before being destroyed. Any further submit is forbidden. This makes it possible for the implementation to perform additional optimizations.
MultipleSubmit = 0
The command buffer can be used multiple times, but must not execute or record more than once simultaneously. In other words, it is as if executing the command buffer borrows it mutably.
SimultaneousUse = 4
The command buffer can be executed multiple times in parallel on different queues. If it’s a secondary command buffer, it can be recorded to multiple primary command buffers at once.
Trait Implementations§
source§impl Clone for CommandBufferUsage
impl Clone for CommandBufferUsage
source§fn clone(&self) -> CommandBufferUsage
fn clone(&self) -> CommandBufferUsage
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for CommandBufferUsage
impl Debug for CommandBufferUsage
source§impl From<CommandBufferUsage> for CommandBufferUsageFlags
impl From<CommandBufferUsage> for CommandBufferUsageFlags
source§fn from(val: CommandBufferUsage) -> Self
fn from(val: CommandBufferUsage) -> Self
Converts to this type from the input type.
source§impl Ord for CommandBufferUsage
impl Ord for CommandBufferUsage
source§fn cmp(&self, other: &CommandBufferUsage) -> Ordering
fn cmp(&self, other: &CommandBufferUsage) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for CommandBufferUsage
impl PartialEq for CommandBufferUsage
source§fn eq(&self, other: &CommandBufferUsage) -> bool
fn eq(&self, other: &CommandBufferUsage) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for CommandBufferUsage
impl PartialOrd for CommandBufferUsage
source§fn partial_cmp(&self, other: &CommandBufferUsage) -> Option<Ordering>
fn partial_cmp(&self, other: &CommandBufferUsage) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for CommandBufferUsage
impl Eq for CommandBufferUsage
impl StructuralEq for CommandBufferUsage
impl StructuralPartialEq for CommandBufferUsage
Auto Trait Implementations§
impl RefUnwindSafe for CommandBufferUsage
impl Send for CommandBufferUsage
impl Sync for CommandBufferUsage
impl Unpin for CommandBufferUsage
impl UnwindSafe for CommandBufferUsage
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more