---
title: MTLNewComputePipelineStateCompletionHandler
framework: metal
role: symbol
role_heading: Type Alias
path: metal/mtlnewcomputepipelinestatecompletionhandler
---

# MTLNewComputePipelineStateCompletionHandler

A completion handler signature a method calls when it finishes creating a compute pipeline.

## Declaration

```swift
typealias MTLNewComputePipelineStateCompletionHandler = ((any MTLComputePipelineState)?, (any Error)?) -> Void
```

## Parameters

- `computePipelineState`: An doc://com.apple.metal/documentation/Metal/MTLComputePipelineState instance if the method completes successfully; otherwise nil.
- `error`: On return, if an error occurs, a pointer to an error information instance; otherwise nil.

## See Also

### Supporting types

- [MTLNewRenderPipelineStateCompletionHandler](metal/mtlnewrenderpipelinestatecompletionhandler.md)
- [MTLNewRenderPipelineStateWithReflectionCompletionHandler](metal/mtlnewrenderpipelinestatewithreflectioncompletionhandler.md)
- [MTLNewComputePipelineStateWithReflectionCompletionHandler](metal/mtlnewcomputepipelinestatewithreflectioncompletionhandler.md)
