Skip to main content

LoadOp

Enum LoadOp 

Source
pub enum LoadOp<T> {
    Clear(T),
    DontCare,
    Load,
}
Expand description

Specifies the state of a color or combined depth and stencil attachment image during graphic render pass framebuffer load operations.

Use this to specify the desired contents of any image before use in a pipeline command buffer.

Variants§

§

Clear(T)

Clears the attachment.

T will be ClearColorValue for color images or vk::ClearDepthStencilValue for combined depth and stencil images.

§

DontCare

The attachment will become undefined and reads will produce garbage data.

§

Load

The attachment will be preserved in memory.

Implementations§

Source§

impl LoadOp<ClearColorValue>

Source

pub const CLEAR_BLACK_ALPHA_ONE: Self

A load operation which results in a color attachment filled with rgb zeros and alpha ones.

Source

pub const CLEAR_BLACK_ALPHA_ZERO: Self

A load operation which results in a color attachment filled with zeros.

Source

pub const CLEAR_WHITE_ALPHA_ONE: Self

A load operation which results in a color attachment filled with rgb zeros and alpha ones.

Source

pub const CLEAR_WHITE_ALPHA_ZERO: Self

A load operation which results in a color attachment filled with rgb ones and alpha zeros.

Source

pub fn clear_rgba(r: f32, g: f32, b: f32, a: f32) -> Self

Convenience constructor for clear color values.

Source§

impl LoadOp<ClearDepthStencilValue>

Source

pub const CLEAR_ONE_STENCIL_ZERO: Self

A load operation which results in a depth attachment filled with ones and stencil filled with zeros.

Source

pub const CLEAR_ZERO_STENCIL_ZERO: Self

A load operation which results in a depth and stencil attachment filled with zeros.

Source

pub fn clear_depth_stencil(depth: f32, stencil: u32) -> Self

Convenience constructor for clear depth and stencil values.

Trait Implementations§

Source§

impl<T: Clone> Clone for LoadOp<T>

Source§

fn clone(&self) -> LoadOp<T>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T: Debug> Debug for LoadOp<T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T: Copy> Copy for LoadOp<T>

Auto Trait Implementations§

§

impl<T> Freeze for LoadOp<T>
where T: Freeze,

§

impl<T> RefUnwindSafe for LoadOp<T>
where T: RefUnwindSafe,

§

impl<T> Send for LoadOp<T>
where T: Send,

§

impl<T> Sync for LoadOp<T>
where T: Sync,

§

impl<T> Unpin for LoadOp<T>
where T: Unpin,

§

impl<T> UnsafeUnpin for LoadOp<T>
where T: UnsafeUnpin,

§

impl<T> UnwindSafe for LoadOp<T>
where T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.