The resource is stored in system memory and is accessible to both the CPU and the GPU.
- iOS 9.0+
- macOS 10.11+
- Mac Catalyst 13.0+Beta
- tvOS 9.0+
This is the default storage mode for
MTLBuffer objects. In iOS and tvOS, this is also the default storage mode for
MTLTexture objects. In macOS, the shared storage mode is not available for
When either the CPU or GPU changes the contents of the resource, you are responsible for synchronizing access to the texture from the other participant.
If you use the CPU to change the contents of the resource, you must complete those changes before you commit a command buffer that accesses that resource.
If you use encode commands in a command buffer that change the contents of the resource, your code running on the CPU must not read the contents of the resource until the command buffer completes execution (that is, the
status property of the MTLCommandBuffer object is
For more guidance on how to choose storage modes, see Setting Resource Storage Modes.