MTLResourceOptions

Optional arguments used to set the behavior of a resource.

Values

ValueMeaning
DefaultCacheMTLCPUCacheMode.DefaultCache << MTLResourceCPUCacheModeShift

The default CPU cache mode for the resource, which guarantees that read and write operations are executed in the expected order.

CPUCacheModeWriteCombinedMTLCPUCacheMode.WriteCombined << MTLResourceCPUCacheModeShift

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

StorageModeSharedMTLStorageMode.Shared << MTLResourceStorageModeShift

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

StorageModeManagedMTLStorageMode.Managed << MTLResourceStorageModeShift

The CPU and GPU may maintain separate copies of the resource, which you need to explicitly synchronize.

StorageModePrivateMTLStorageMode.Private << MTLResourceStorageModeShift

The resource can be accessed only by the GPU.

StorageModeMemorylessMTLStorageMode.Memoryless << MTLResourceStorageModeShift

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

HazardTrackingModeDefaultMTLHazardTrackingMode.Default << MTLResourceHazardTrackingModeShift

An option specifying that the default tracking mode should be used.

HazardTrackingModeTrackedMTLHazardTrackingMode.Tracked << MTLResourceHazardTrackingModeShift

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

HazardTrackingModeUntrackedMTLHazardTrackingMode.Untracked << MTLResourceHazardTrackingModeShift

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

Meta