Contents

storeAction

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

Declaration

var storeAction: MTLStoreAction { get set }

Mentioned in

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:

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