VkClearAttachment(3)

Name

VkClearAttachment - Structure specifying a clear attachment

C Specification

The VkClearAttachment structure is defined as:

// Provided by VK_VERSION_1_0
typedef struct VkClearAttachment {
    VkImageAspectFlags    aspectMask;
    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 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
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

Document Notes

For more information, see the Vulkan Specification.

This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.