<!--
{
  "availability" : [
    "iOS: 11.0.0 -",
    "iPadOS: 11.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.13.0 -",
    "tvOS: 11.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTLCaptureScope/commandQueue",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "c:objc(pl)MTLCaptureScope(py)commandQueue"
  },
  "title" : "commandQueue"
}
-->

# commandQueue

The command queue that this capture scope uses to limit which commands are recorded.

```
var commandQueue: (any MTLCommandQueue)? { get }
```

## Discussion

This value is only available if you created the capture scope by calling the [`makeCaptureScope(commandQueue:)`](/documentation/Metal/MTLCaptureManager/makeCaptureScope(commandQueue:)-1rozd) method. Otherwise, the value is `nil`.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)