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.

Beta
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.

Beta
var resourceOptions: MTLResourceOptions

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

Beta
var size: Int

The size of the heap, in bytes.

enum MTLHazardTrackingMode

The options you use to specify the hazard tracking mode.

Beta
enum MTLHeapType

The options you use to choose the heap type.

Beta

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.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software