Struct bedrock::vk::VkAttachmentDescription [] [src]

#[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

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

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

The number of samples of the image as defined in VkSampleCountFlagBits

Possible Bitmasks

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

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 format For attachments with a color format
VK_ATTACHMENT_LOAD_OP_LOAD VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT VK_ACCESS_COLOR_ATTTACHMENT_READ_BIT
VK_ATTACHMENT_LOAD_OP_CLEAR VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT VK_ACCESS_COLOR_ATTTACHMENT_WRITE_BIT
VK_ATTACHMENT_LOAD_OP_DONT_CARE VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT VK_ACCESS_COLOR_ATTTACHMENT_WRITE_BIT

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

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

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

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

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

impl Debug for VkAttachmentDescription
[src]

[src]

Formats the value using the given formatter. Read more

impl Clone for VkAttachmentDescription
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl PartialEq for VkAttachmentDescription
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl Eq for VkAttachmentDescription
[src]

impl Borrow<AttachmentDescription> for VkAttachmentDescription
[src]

[src]

Immutably borrows from an owned value. Read more

impl BorrowMut<AttachmentDescription> for VkAttachmentDescription
[src]

[src]

Mutably borrows from an owned value. Read more

Auto Trait Implementations