#[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: VkAttachmentDescriptionFlagsA 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: VkFormatA VkFormat value specifying the format of the image that will be used for the attachment
samples: VkSampleCountFlagsThe number of samples of the image as defined in VkSampleCountFlagBits
§Possible Bitmasks
1, 2, 4, 8, 16, 32, 64
loadOp: VkAttachmentLoadOpA 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 |
storeOp: VkAttachmentStoreOpA 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: VkAttachmentLoadOpA 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_LOADrequiresVK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BITVK_ATTACHMENT_LOAD_OP_CLEARrequiresVK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BITVK_ATTACHMENT_LOAD_OP_DONT_CARErequiresVK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT
stencilStoreOp: VkAttachmentStoreOpA 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: VkImageLayoutThe layout the attachment image subresource will be in when a render pass instance begins.
finalLayout: VkImageLayoutThe 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
impl Borrow<AttachmentDescription> for VkAttachmentDescription
Source§fn borrow(&self) -> &AttachmentDescription
fn borrow(&self) -> &AttachmentDescription
Source§impl BorrowMut<AttachmentDescription> for VkAttachmentDescription
impl BorrowMut<AttachmentDescription> for VkAttachmentDescription
Source§fn borrow_mut(&mut self) -> &mut AttachmentDescription
fn borrow_mut(&mut self) -> &mut AttachmentDescription
Source§impl Clone for VkAttachmentDescription
impl Clone for VkAttachmentDescription
Source§fn clone(&self) -> VkAttachmentDescription
fn clone(&self) -> VkAttachmentDescription
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more