<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTLCommandBuffer/makeComputeCommandEncoder()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "c:objc(pl)MTLCommandBuffer(im)computeCommandEncoder"
  },
  "title" : "makeComputeCommandEncoder()"
}
-->

# makeComputeCommandEncoder()

Creates a compute command encoder that uses default settings.

```
func makeComputeCommandEncoder() -> (any MTLComputeCommandEncoder)?
```

## Discussion

Use an [`MTLComputeCommandEncoder`](/documentation/Metal/MTLComputeCommandEncoder) instance’s methods to set up a single compute pass. The encoder this method returns dispatches its compute commands serially (see [`MTLDispatchType.serial`](/documentation/Metal/MTLDispatchType/serial)). To create a compute command encoder that dispatches commands concurrently (see [`MTLDispatchType.concurrent`](/documentation/Metal/MTLDispatchType/concurrent)), use the [`makeComputeCommandEncoder(dispatchType:)`](/documentation/Metal/MTLCommandBuffer/makeComputeCommandEncoder(dispatchType:)) or [`makeComputeCommandEncoder(descriptor:)`](/documentation/Metal/MTLCommandBuffer/makeComputeCommandEncoder(descriptor:)) method.

---

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)