Class

MTLCaptureManager

An object you use to capture Metal command data in your app.

Declaration

@interface MTLCaptureManager : NSObject

Overview

Capture manager works with Metal’s frame capture feature to:

The Metal debugger requires you to enable GPU Frame Capture in your project settings; see Enabling Frame Capture.

For more information about Metal frame capture, see Frame Capture Debugging Tools.

Topics

Obtaining the Shared Capture Manager

+ sharedCaptureManager

Provides the shared capture manager for your Metal app.

Querying Support for a Capture Destination

- supportsDestination:

Checks to see whether a particular capture destination is supported.

Creating a Capture Scope

- newCaptureScopeWithDevice:

Creates a capture scope for commands submitted to a specific device object.

- newCaptureScopeWithCommandQueue:

Creates a capture scope for commands submitted to a specific command queue.

defaultCaptureScope

The capture scope to use when a capture is initiated in Xcode.

Starting Capture

Start capturing Metal commands for presentation in the Metal debugger.

- startCaptureWithDescriptor:error:

Starts capturing any of your app’s Metal commands, with the capture session defined by a descriptor object.

- startCaptureWithDevice:

Starts capturing any of your app’s Metal commands that are executed by the device object.

Deprecated
- startCaptureWithCommandQueue:

Starts capturing any of your app’s Metal commands that are executed by the command queue.

Deprecated
- startCaptureWithScope:

Starts capturing any of your app’s Metal commands that are in the specified capture scope.

Deprecated

Stopping Capture

- stopCapture

Stops capturing Metal commands.

Monitoring Capture

isCapturing

A Boolean value that indicates whether Metal commands are being captured.

Relationships

Inherits From

See Also

Capturing a Frame Programmatically

Capturing GPU Command Data Programmatically

Invoke Metal’s frame capture from your app under the specific runtime conditions you choose.

Capturing Metal Commands Programmatically

Invoke Metal’s frame capture from your app, then save the resulting GPU trace to a file or view it in Xcode.

Creating a Custom Capture Scope

Use custom capture scopes to control which commands get captured.

MTLCaptureScope

An object that defines custom boundaries for a GPU frame capture.

MTLCaptureDescriptor

A configuration for a Metal capture session.

MTLCaptureDestination

The kinds of destinations for captured command data.

MTLCaptureErrorDomain

The error domain for capture errors.

MTLCaptureError

Errors returned by capture sessions.