VkAttachmentDescription

Struct VkAttachmentDescription 

Source
#[repr(C)]
pub struct VkAttachmentDescription { pub flags: VkAttachmentDescriptionFlags, pub format: VkFormat, pub samples: VkSampleCountFlags, pub loadOp: VkAttachmentLoadOp, pub storeOp: VkAttachmentStoreOp, pub stencilLoadOp: VkAttachmentLoadOp, pub stencilStoreOp: VkAttachmentStoreOp, pub initialLayout: VkImageLayout, pub finalLayout: VkImageLayout, }

Fields§

§flags: VkAttachmentDescriptionFlags

A bitmask of VkAttachmentDescriptionFlagBits specifying additional properties of the attachment.

§Possible Bitmasks

  • 0: No flags
  • VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT: The attachment aliases the same device memory as other attachments
§format: VkFormat

A VkFormat value specifying the format of the image that will be used for the attachment

§samples: VkSampleCountFlags

The number of samples of the image as defined in VkSampleCountFlagBits

§Possible Bitmasks

1, 2, 4, 8, 16, 32, 64

§loadOp: VkAttachmentLoadOp

A VkAttachmentLoadOp value specifying how the contents of color and depth components of the attachment are treated at the beginning of the subpass where it is first used

§Possible Values

  • VK_ATTACHMENT_LOAD_OP_LOAD: The previous contents of the image within the render area will be preserved.
  • VK_ATTACHMENT_LOAD_OP_CLEAR: The contents within the render area will be cleared to a uniform value, which is specified when a render pass instance is begun.
  • VK_ATTACHMENT_LOAD_OP_DONT_CARE: The previous contents within the area need not be preserved; the contents of the attachment will be undefined inside the render area.

§Access Type Requirements

For attachments with a depth formatFor attachments with a color format
VK_ATTACHMENT_LOAD_OP_LOADVK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BITVK_ACCESS_COLOR_ATTTACHMENT_READ_BIT
VK_ATTACHMENT_LOAD_OP_CLEARVK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BITVK_ACCESS_COLOR_ATTTACHMENT_WRITE_BIT
VK_ATTACHMENT_LOAD_OP_DONT_CAREVK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BITVK_ACCESS_COLOR_ATTTACHMENT_WRITE_BIT
§storeOp: VkAttachmentStoreOp

A VkAttachmentStoreOp value specifying how the contents of color and depth components of the attachment are treated at the end of the subpass where it is last used.

§Possible Values

  • VK_ATTACHMENT_STORE_OP_STORE: The contents generated during the render pass and within the render area are written to memory.
  • VK_ATTACHMENT_STORE_OP_DONT_CARE: The contents within the render area are not needed after rendering, and may be discarded; the contents of the attachment will be undefined inside the render area.

§Access Type Requirements

  • For attachments with a depth format: Both values require VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT
  • For attachments with a color format: Both values require VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT
§stencilLoadOp: VkAttachmentLoadOp

A VkAttachmentLoadOp value specifying how the contents of stencil components of the attachment are treated at the beginning of the subpass where it is first used

§Possible Values

  • VK_ATTACHMENT_LOAD_OP_LOAD: The previous contents of the image within the render area will be preserved.
  • VK_ATTACHMENT_LOAD_OP_CLEAR: The contents within the render area will be cleared to a uniform value, which is specified when a render pass instance is begun.
  • VK_ATTACHMENT_LOAD_OP_DONT_CARE: The previous contents within the area need not be preserved; the contents of the attachment will be undefined inside the render area.

§Access Type Requirements

  • VK_ATTACHMENT_LOAD_OP_LOAD requires VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT
  • VK_ATTACHMENT_LOAD_OP_CLEAR requires VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT
  • VK_ATTACHMENT_LOAD_OP_DONT_CARE requires VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT
§stencilStoreOp: VkAttachmentStoreOp

A VkAttachmentStoreOp value specifying how the contents of stencil components of the attachment are treated at the end of the subpass where it is last used.

§Possible Values

  • VK_ATTACHMENT_STORE_OP_STORE: The contents generated during the render pass and within the render area are written to memory.
  • VK_ATTACHMENT_STORE_OP_DONT_CARE: The contents within the render area are not needed after rendering, and may be discarded; the contents of the attachment will be undefined inside the render area.

§Access Type Requirements

  • Both values require VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT
§initialLayout: VkImageLayout

The layout the attachment image subresource will be in when a render pass instance begins.

§finalLayout: VkImageLayout

The layout the attachment image subresource will be transitioned to when a render pass instance ends. During a render pass instance, an attachment can use a different layout in each subpass, if desired.

Trait Implementations§

Source§

impl Borrow<AttachmentDescription> for VkAttachmentDescription

Source§

fn borrow(&self) -> &AttachmentDescription

Immutably borrows from an owned value. Read more
Source§

impl BorrowMut<AttachmentDescription> for VkAttachmentDescription

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl Clone for VkAttachmentDescription

Source§

fn clone(&self) -> VkAttachmentDescription

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for VkAttachmentDescription

Source§

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

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

impl PartialEq for VkAttachmentDescription

Source§

fn eq(&self, other: &VkAttachmentDescription) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for VkAttachmentDescription

Source§

impl StructuralPartialEq for VkAttachmentDescription

Auto Trait Implementations§

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.