Structures
VkClearAttachment
Structure specifying a clear attachment
The VkClearAttachment
structure is defined as:
typedef struct VkClearAttachment {
VkImageAspectFlags aspectMask;
uint32_t colorAttachment;
VkClearValue clearValue;
} VkClearAttachment;
aspectMask
is a mask selecting the color, depth and/or stencil aspects of the attachment to be cleared.colorAttachment
is only meaningful ifVK_IMAGE_ASPECT_COLOR_BIT
is set inaspectMask
, 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.
Valid Usage
VUID-VkClearAttachment-aspectMask-00019
If aspectMask
includes VK_IMAGE_ASPECT_COLOR_BIT
, it must
not include VK_IMAGE_ASPECT_DEPTH_BIT
or
VK_IMAGE_ASPECT_STENCIL_BIT
VUID-VkClearAttachment-aspectMask-00020
aspectMask
must not include VK_IMAGE_ASPECT_METADATA_BIT
VUID-VkClearAttachment-aspectMask-02246
aspectMask
must not include
VK_IMAGE_ASPECT_MEMORY_PLANEiBIT_EXT for any index i
Valid Usage (Implicit)
VUID-VkClearAttachment-aspectMask-parameter
aspectMask
must be a valid combination of VkImageAspectFlagBits values
VUID-VkClearAttachment-aspectMask-requiredbitmask
aspectMask
must not be 0