Structure

MTLResourceOptions

Optional arguments used to set the behavior of a resource.

Declaration

struct MTLResourceOptions

Topics

Initializing Resource Options

Specifying CPU Cache Modes

static var cpuCacheModeWriteCombined: MTLResourceOptions

A write-combined CPU cache mode that is optimized for resources that the CPU writes into, but never reads.

Specifying Storage Modes

static var storageModeShared: MTLResourceOptions

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

static var storageModeManaged: MTLResourceOptions

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

static var storageModePrivate: MTLResourceOptions

The resource can be accessed only by the GPU.

static var storageModeMemoryless: MTLResourceOptions

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

Specifying Hazard Tracking

static var hazardTrackingModeTracked: MTLResourceOptions

An option specifying that Metal prevents hazards when modifying this object's contents.

static var hazardTrackingModeUntracked: MTLResourceOptions

An option specifying that the app must prevent hazards when modifying this object's contents.

Deprecated Options

static var optionCPUCacheModeWriteCombined: MTLResourceOptions

This constant was deprecated in iOS 9.0 and macOS 10.11.

Relationships

Conforms To