C Specification

The VkClearAttachment structure is defined as:

// Provided by VK_VERSION_1_0
typedef struct VkClearAttachment {
uint32_t              colorAttachment;
VkClearValue          clearValue;
} VkClearAttachment;

Members

• aspectMask is a mask selecting the color, depth and/or stencil aspects of the attachment to be cleared.

• colorAttachment is only meaningful if VK_IMAGE_ASPECT_COLOR_BIT is set in aspectMask, in which case it is an index into the currently bound color attachments.

• clearValue is the color or depth/stencil value to clear the attachment to, as described in Clear Values below.

Description

Valid Usage
If aspectMask includes VK_IMAGE_ASPECT_COLOR_BIT, it must not include VK_IMAGE_ASPECT_DEPTH_BIT or VK_IMAGE_ASPECT_STENCIL_BIT

aspectMask must not include VK_IMAGE_ASPECT_METADATA_BIT

aspectMask must not include VK_IMAGE_ASPECT_MEMORY_PLANE_i_BIT_EXT for any index i

• VUID-VkClearAttachment-clearValue-00021
clearValue must be a valid VkClearValue union

Valid Usage (Implicit)
aspectMask must be a valid combination of VkImageAspectFlagBits values

aspectMask must not be 0