Options for the memory location and access permissions for a resource.


enum MTLStorageMode : UInt


For more guidance on how to choose storage modes, see Setting Resource Storage Modes.


Storage Mode Options

case shared

The resource is stored in system memory and is accessible to both the CPU and the GPU.

case managed

The CPU and GPU may maintain separate copies of the resource, and any changes must be explicitly synchronized.

case `private`

The resource can be accessed only by the GPU.

case memoryless

The resource’s contents can be accessed only by the GPU and only exist temporarily during a render pass.

See Also

Reading Memory and Storage Properties

var cpuCacheMode: MTLCPUCacheMode

The CPU cache mode that defines the CPU mapping of the resource.


var storageMode: MTLStorageMode

The location and access permissions of the resource.


var hazardTrackingMode: MTLHazardTrackingMode

A mode that determines whether Metal tracks and synchronizes resource access.


var resourceOptions: MTLResourceOptions

The storage mode, CPU cache mode, and hazard tracking mode of the resource.


enum MTLCPUCacheMode

Options for the CPU cache mode that define the CPU mapping of the resource.

enum MTLHazardTrackingMode

The options you use to specify the hazard tracking mode.