---
title: MTLCaptureScope
framework: metal
role: symbol
role_heading: Protocol
path: metal/mtlcapturescope
---

# MTLCaptureScope

A type that can programmatically customize a GPU frame capture.

## Declaration

```swift
protocol MTLCaptureScope : NSObjectProtocol
```

## Overview

Overview Each capture scope instance configures what a frame capture records and methods that programmatically start and stop recording data. Filter the commands a frame capture records by selecting specific sources with a capture scope. By contrast, the default capture scope records all the data for a single frame when you click the Capture GPU workload button in the debug bar in Xcode. You can choose which data Metal records during a frame capture by creating your own capture scope. You can program exactly which Metal commands to record in a frame capture by calling the begin() and end() methods around the Metal calls you want the capture to include. In the case of a rendering loop, your calls to begin() and end() can capture a small part of a frame, or capture data from multiple frames. For more information about frame captures and capture scopes, see Metal debugger and Metal developer workflows, respectively.

## Topics

### Defining capture scope boundaries

- [begin()](metal/mtlcapturescope/begin().md)
- [end()](metal/mtlcapturescope/end().md)

### Identifying the capture scope

- [label](metal/mtlcapturescope/label.md)
- [device](metal/mtlcapturescope/device.md)
- [commandQueue](metal/mtlcapturescope/commandqueue.md)

### Instance Properties

- [mtl4CommandQueue](metal/mtlcapturescope/mtl4commandqueue.md)

## Relationships

### Inherits From

- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Frame capture

- [MTLCaptureDescriptor](metal/mtlcapturedescriptor.md)
- [MTLCaptureManager](metal/mtlcapturemanager.md)
- [MTLCaptureDestination](metal/mtlcapturedestination.md)
