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
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 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: 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
requiresVK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT
VK_ATTACHMENT_LOAD_OP_CLEAR
requiresVK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT
VK_ATTACHMENT_LOAD_OP_DONT_CARE
requiresVK_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
impl Debug for VkAttachmentDescription
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Clone for VkAttachmentDescription
[src]
fn clone(&self) -> VkAttachmentDescription
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq for VkAttachmentDescription
[src]
fn eq(&self, __arg_0: &VkAttachmentDescription) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &VkAttachmentDescription) -> bool
[src]
This method tests for !=
.
impl Eq for VkAttachmentDescription
[src]
impl Borrow<AttachmentDescription> for VkAttachmentDescription
[src]
fn borrow(&self) -> &AttachmentDescription
[src]
Immutably borrows from an owned value. Read more
impl BorrowMut<AttachmentDescription> for VkAttachmentDescription
[src]
fn borrow_mut(&mut self) -> &mut AttachmentDescription
[src]
Mutably borrows from an owned value. Read more