An object you use to configure new heap objects.


class MTLHeapDescriptor : NSObject


To create a new MTLHeap, first create a MTLHeapDescriptor object and set its property values. Then, call the makeHeap(descriptor:) method of a MTLDevice object.

When you create a heap, Metal copies the descriptor’s property values into the new heap. You can reuse a MTLHeapDescriptor object, modifying its property values as needed, to create more MTLHeap objects.


Specifying Heap Attributes

var type: MTLHeapType

The type of heap to create.

var storageMode: MTLStorageMode

The storage mode for the heap.

var cpuCacheMode: MTLCPUCacheMode

The CPU cache mode for the heap.

var hazardTrackingMode: MTLHazardTrackingMode

The heap's hazard tracking mode.

var resourceOptions: MTLResourceOptions

The options for all the resources you create on the heap.

var size: Int

The size of the heap, in bytes.

enum MTLHazardTrackingMode

The options you use to specify the hazard tracking mode.

enum MTLHeapType

The options you use to choose the heap type.


Inherits From

See Also


Implementing a Multistage Image Filter Using Heaps and Fences

Use fences to synchronize access to resources allocated on a heap.

protocol MTLHeap

A memory pool from which you can suballocate resources.

struct MTLSizeAndAlign

The size and alignment of a resource, in bytes.