Instance Property

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 }

Discussion

If your app does not need the data in the texture after the rendering pass is complete, 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 (see Feature Availability for further information).

When the store action is either MTLStoreAction.multisampleResolve or MTLStoreAction.storeAndMultisampleResolve, the resolveTexture property must be set to the texture to use as the target for the resolve action. The resolveLevel, resolveSlice, and resolveDepthPlane properties may also be used for the multisample resolve operation to specify the mipmap level, cube slice, and depth plane of the multisample 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

var loadAction: MTLLoadAction

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

var storeActionOptions: MTLStoreActionOptions

The options that modify the store action performed by this attachment.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software