Instance Property


The size of the heap, in bytes.


var size: Int { get set }


The default value is 0.

You can use the heapBufferSizeAndAlign(length:options:) and heapTextureSizeAndAlign(descriptor:) methods to help you determine the correct size for the heap. Metal may round the size of the heap to a page boundary.

See Also

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.

enum MTLHazardTrackingMode

The options you use to specify the hazard tracking mode.

enum MTLHeapType

The options you use to choose the heap type.