VkAttachmentStoreOp(3)

# VkAttachmentStoreOp(3) Manual Page

## Name

VkAttachmentStoreOp - Specify how contents of an attachment are treated at the end of a subpass

Loading... please wait.

## C Specification

Possible values of VkAttachmentDescription::`storeOp` and `stencilStoreOp`, specifying how the contents of the attachment are treated, are:

    typedef enum VkAttachmentStoreOp {
        VK_ATTACHMENT_STORE_OP_STORE = 0,
        VK_ATTACHMENT_STORE_OP_DONT_CARE = 1,
        VK_ATTACHMENT_STORE_OP_NONE_QCOM = 1000301000,
    } VkAttachmentStoreOp;

## Description

- `VK_ATTACHMENT_STORE_OP_STORE` specifies the contents generated during the render pass and within the render area are written to memory. For attachments with a depth/stencil format, this uses the access type `VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT`. For attachments with a color format, this uses the access type `VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT`.

- `VK_ATTACHMENT_STORE_OP_DONT_CARE` specifies 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. For attachments with a depth/stencil format, this uses the access type `VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT`. For attachments with a color format, this uses the access type `VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT`.

- `VK_ATTACHMENT_STORE_OP_NONE_QCOM` specifies that the contents within the render area were not written during rendering, and may not be written to memory. If the attachment was written to during the renderpass, the contents of the attachment will be undefined inside the render area.

| Note `VK_ATTACHMENT_STORE_OP_DONT_CARE` can cause contents generated during previous render passes to be discarded before reaching memory, even if no write to the attachment occurs during the current render pass.

## See Also

VkAttachmentDescription, VkAttachmentDescription2

## 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.

## Copyright

Copyright (c) 2014-2020 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.