<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 11.0.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTLComputePassDescriptor",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "c:objc(cs)MTLComputePassDescriptor"
  },
  "title" : "MTLComputePassDescriptor"
}
-->

# MTLComputePassDescriptor

A description of how to dispatch execution of pass commands and GPU performance sampling.

```
class MTLComputePassDescriptor
```

## Topics

### Creating a compute pass descriptor

[`computePassDescriptor`](/documentation/Metal/MTLComputePassDescriptor/computePassDescriptor)

Creates a default compute pass descriptor.

### Configuring the dispatch mechanism

[`dispatchType`](/documentation/Metal/MTLComputePassDescriptor/dispatchType)

The strategy for dispatching any compute commands encoded in the compute pass.

### Specifying sample buffers for GPU counters

[`sampleBufferAttachments`](/documentation/Metal/MTLComputePassDescriptor/sampleBufferAttachments)

The sample buffers that the compute pass can access.



---

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)