Contents

makeResidencySet(descriptor:)

Creates a residency set, which can move resources in and out of memory residency.

Declaration

func makeResidencySet(descriptor desc: MTLResidencySetDescriptor) throws -> any MTLResidencySet

Parameters

  • desc:

    A descriptor instance that configures the residency set the method creates.

Mentioned in

Return Value

A new MTLResidencySet instance if the method completes successfully; otherwise Swift throws an error and Objective-C returns nil.

Discussion

Create an MTLResidencySet by creating and configuring an MTLResidencySetDescriptor instance and pass it to this method.

See Simplifying GPU resource management with residency sets for more information.