<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTLRenderPassAttachmentDescriptor/storeAction",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "c:objc(cs)MTLRenderPassAttachmentDescriptor(py)storeAction"
  },
  "title" : "storeAction"
}
-->

# storeAction

The action performed by this attachment at the end of a rendering pass for a render command encoder.

```
var storeAction: MTLStoreAction { get set }
```

## Discussion

If your app doesn’t need the data in the texture after completing the rendering pass, use the [`MTLStoreAction.dontCare`](/documentation/Metal/MTLStoreAction/dontCare) action.
Otherwise, use the [`MTLStoreAction.store`](/documentation/Metal/MTLStoreAction/store) action if the texture is directly stored or the [`MTLStoreAction.multisampleResolve`](/documentation/Metal/MTLStoreAction/multisampleResolve) action if the texture is a multisampled texture.
In some feature sets, you can use the [`MTLStoreAction.storeAndMultisampleResolve`](/documentation/Metal/MTLStoreAction/storeAndMultisampleResolve) action to store and resolve the texture in a single rendering pass.
For more information, see:

- [Metal feature set tables (PDF)](https://developer.apple.com/metal/Metal-Feature-Set-Tables.pdf)
- [Metal feature set tables (Numbers)](https://developer.apple.com/metal/metal-feature-set-tables.zip)

When the store action is either [`MTLStoreAction.multisampleResolve`](/documentation/Metal/MTLStoreAction/multisampleResolve) or [`MTLStoreAction.storeAndMultisampleResolve`](/documentation/Metal/MTLStoreAction/storeAndMultisampleResolve), the [`resolveTexture`](/documentation/Metal/MTLRenderPassAttachmentDescriptor/resolveTexture) property needs to be set to the texture to use as the target for the resolve action. Use the [`resolveLevel`](/documentation/Metal/MTLRenderPassAttachmentDescriptor/resolveLevel), [`resolveSlice`](/documentation/Metal/MTLRenderPassAttachmentDescriptor/resolveSlice), and [`resolveDepthPlane`](/documentation/Metal/MTLRenderPassAttachmentDescriptor/resolveDepthPlane) properties to specify the mipmap level, cube slice, and depth plane of the resolve texture, respectively.

For color render targets, the default value is [`MTLStoreAction.store`](/documentation/Metal/MTLStoreAction/store). For depth or stencil render targets, the default value is [`MTLStoreAction.dontCare`](/documentation/Metal/MTLStoreAction/dontCare).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)