---
title: storeAction
framework: metal
role: symbol
role_heading: Instance Property
path: metal/mtlrenderpassattachmentdescriptor/storeaction
---

# storeAction

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

## Declaration

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

## Mentioned in

Setting load and store actions Storing data a pass makes with custom sample positions for a subsequent pass

## Discussion

Discussion If your app doesn’t need the data in the texture after completing the rendering pass, use the MTLStoreAction.dontCare action. Otherwise, use the MTLStoreAction.store action if the texture is directly stored or the MTLStoreAction.multisampleResolve action if the texture is a multisampled texture. In some feature sets, you can use the MTLStoreAction.storeAndMultisampleResolve action to store and resolve the texture in a single rendering pass. For more information, see: Metal feature set tables (PDF) Metal feature set tables (Numbers) When the store action is either MTLStoreAction.multisampleResolve or MTLStoreAction.storeAndMultisampleResolve, the resolveTexture property needs to be set to the texture to use as the target for the resolve action. Use the resolveLevel, resolveSlice, and 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. For depth or stencil render targets, the default value is MTLStoreAction.dontCare.

## See Also

### Specifying rendering pass actions

- [loadAction](metal/mtlrenderpassattachmentdescriptor/loadaction.md)
- [storeActionOptions](metal/mtlrenderpassattachmentdescriptor/storeactionoptions.md)
