Enum wgpu_types::LoadOp
source · #[repr(u8)]pub enum LoadOp<V> {
Clear(V),
Load = 1,
}
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 = 1
Loads the existing value for this attachment into the render pass.
Implementations§
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
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