Class

MTLHeapDescriptor

An object you use to configure new heap objects.

Declaration

class MTLHeapDescriptor : NSObject

Overview

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.

Topics

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.

Relationships

Inherits From

See Also

Essentials

Image Filter Graph with Heaps and Fences

Demonstrates how to use heaps and fences to optimize a multistage image filter.

protocol MTLHeap

A memory pool from which you can suballocate resources.

struct MTLSizeAndAlign

The size and alignment of a resource, in bytes.