Contents

makeComputePipelineState(descriptor:options:completionHandler:)

Asynchronously creates a compute pipeline state and reflection information.

Declaration

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

Parameters

  • descriptor:

    An Mtlcomputepipelinedescriptor instance.

  • options:

    An 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

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