pub enum LoadOp<V> {
Clear(V),
Load,
}
Expand description
Operation to perform to the output attachment at the start of a render pass.
Corresponds to WebGPU GPULoadOp
,
plus the corresponding clearValue.
Variants§
Clear(V)
Loads the specified value for this attachment into the render pass.
On some GPU hardware (primarily mobile), “clear” is significantly cheaper because it avoids loading data from main memory into tile-local memory.
On other GPU hardware, there isn’t a significant difference.
As a result, it is recommended to use “clear” rather than “load” in cases where the initial value doesn’t matter (e.g. the render target will be cleared using a skybox).
Load
Loads the existing value for this attachment into the render pass.
Trait Implementations§
source§impl<V: PartialEq> PartialEq for LoadOp<V>
impl<V: PartialEq> PartialEq for LoadOp<V>
impl<V: Copy> Copy for LoadOp<V>
impl<V: Eq> Eq for LoadOp<V>
impl<V> StructuralEq for LoadOp<V>
impl<V> StructuralPartialEq for LoadOp<V>
Auto Trait Implementations§
impl<V> RefUnwindSafe for LoadOp<V>where
V: RefUnwindSafe,
impl<V> Send for LoadOp<V>where
V: Send,
impl<V> Sync for LoadOp<V>where
V: Sync,
impl<V> Unpin for LoadOp<V>where
V: Unpin,
impl<V> UnwindSafe for LoadOp<V>where
V: UnwindSafe,
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
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.