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<'de, V> Deserialize<'de> for LoadOp<V>where
V: Deserialize<'de>,
impl<'de, V> Deserialize<'de> for LoadOp<V>where
V: Deserialize<'de>,
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl<V: Copy> Copy for LoadOp<V>
impl<V: Eq> Eq for LoadOp<V>
impl<V> StructuralPartialEq for LoadOp<V>
Auto Trait Implementations§
impl<V> Freeze for LoadOp<V>where
V: Freeze,
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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.