Enumeration

MTLStorageMode

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

Declaration

typedef enum MTLStorageMode : NSUInteger {
    ...
} MTLStorageMode;

Overview

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

Topics

Storage Mode Options

MTLStorageModeShared

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

MTLStorageModeManaged

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

MTLStorageModePrivate

The resource can be accessed only by the GPU.

MTLStorageModeMemoryless

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

cpuCacheMode

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

Required.

storageMode

The location and access permissions of the resource.

Required.

hazardTrackingMode

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

Required.

resourceOptions

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

Required.

MTLCPUCacheMode

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

MTLHazardTrackingMode

The options you use to specify the hazard tracking mode.