---
title: "makeComputePipelineState(descriptor:options:completionHandler:)"
framework: metal
role: symbol
role_heading: Instance Method
path: "metal/mtldevice/makecomputepipelinestate(descriptor:options:completionhandler:)"
---

# makeComputePipelineState(descriptor:options:completionHandler:)

Asynchronously creates a compute pipeline state and reflection information.

## Declaration

```swift
func makeComputePipelineState(descriptor: MTLComputePipelineDescriptor, options: MTLPipelineOption, completionHandler: @escaping @Sendable ((any MTLComputePipelineState)?, MTLComputePipelineReflection?, (any Error)?) -> Void)
```

```swift
func makeComputePipelineState(descriptor: MTLComputePipelineDescriptor, options: MTLPipelineOption) async throws -> (any MTLComputePipelineState, MTLComputePipelineReflection?)
```

## Parameters

- `descriptor`: An doc://com.apple.metal/documentation/Metal/MTLComputePipelineDescriptor instance.
- `options`: An doc://com.apple.metal/documentation/Metal/MTLPipelineOption instance that represents the reflection information you want the method to generate.
- `completionHandler`: A Swift closure or an Objective-C block the method calls when it finishes creating the compute pipeline state.

## Discussion

Discussion Use the compute pipeline state to configure a compute pass by calling the setComputePipelineState(_:) method of an MTLComputeCommandEncoder instance.

## See Also

### Creating compute pipeline states

- [makeComputePipelineState(descriptor:options:reflection:)](metal/mtldevice/makecomputepipelinestate(descriptor:options:reflection:).md)
- [makeComputePipelineState(function:)](metal/mtldevice/makecomputepipelinestate(function:).md)
- [makeComputePipelineState(function:completionHandler:)](metal/mtldevice/makecomputepipelinestate(function:completionhandler:).md)
- [makeComputePipelineState(function:options:reflection:)](metal/mtldevice/makecomputepipelinestate(function:options:reflection:).md)
- [makeComputePipelineState(function:options:completionHandler:)](metal/mtldevice/makecomputepipelinestate(function:options:completionhandler:).md)
