makeComputePipelineState(function:completionHandler:)
Asynchronously creates a compute pipeline state with a function instance.
Declaration
func makeComputePipelineState(function computeFunction: any MTLFunction, completionHandler: @escaping @Sendable ((any MTLComputePipelineState)?, (any Error)?) -> Void)func makeComputePipelineState(function computeFunction: any MTLFunction) async throws -> any MTLComputePipelineStateParameters
- computeFunction:
An Mtlfunction instance.
- completionHandler:
A Swift closure or an Objective-C block the method calls when it finishes creating the compute pipeline state.
Discussion
Use the compute pipeline state to configure a compute pass by calling the setComputePipelineState(_:) method of an MTLComputeCommandEncoder instance.