Instance Property

storeAction

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

Declaration

@property(nonatomic) MTLStoreAction storeAction;

Discussion

If your app does not need the data in the texture after the rendering pass is complete, use the MTLStoreActionDontCare action. Otherwise, use the MTLStoreActionStore action if the texture is directly stored or the MTLStoreActionMultisampleResolve action if the texture is a multisampled texture. In some feature sets, you can use the MTLStoreActionStoreAndMultisampleResolve action to store and resolve the texture in a single rendering pass (see Feature Availability for further information).

When the store action is either MTLStoreActionMultisampleResolve or MTLStoreActionStoreAndMultisampleResolve, 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 MTLStoreActionStore. For depth or stencil render targets, the default value is MTLStoreActionDontCare.

See Also

Specifying Rendering Pass Actions

loadAction

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

storeActionOptions

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