---
title: "makeComputePipelineState(function:)"
framework: metal
role: symbol
role_heading: Instance Method
path: "metal/mtldevice/makecomputepipelinestate(function:)"
---

# makeComputePipelineState(function:)

Synchronously creates a compute pipeline state with a function instance.

## Declaration

```swift
func makeComputePipelineState(function computeFunction: any MTLFunction) throws -> any MTLComputePipelineState
```

## Parameters

- `computeFunction`: An doc://com.apple.metal/documentation/Metal/MTLFunction instance.

## 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(descriptor:options:completionHandler:)](metal/mtldevice/makecomputepipelinestate(descriptor:options:completionhandler:).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)
