makeComputePipelineState(descriptor:options:reflection:)
Synchronously creates a compute pipeline state and reflection information.
Declaration
func makeComputePipelineState(descriptor: MTLComputePipelineDescriptor, options: MTLPipelineOption, reflection: AutoreleasingUnsafeMutablePointer<MTLAutoreleasedComputePipelineReflection?>?) throws -> any MTLComputePipelineStateParameters
- descriptor:
An Mtlcomputepipelinedescriptor instance.
- options:
An Mtlpipelineoption instance that represents the reflection information you want the method to generate.
- reflection:
In Swift, an optional pointer to an Mtlautoreleasedcomputepipelinereflection optional. In Objective-C, a pointer to an Mtlautoreleasedcomputepipelinereflection instance.
Pass
nilin either language when you don’t need reflection data. Otherwise on return, if the method completes successfully, it assigns an Mtlcomputepipelinereflection instance to the pointee, which contains the details about the function arguments.
Discussion
Use the compute pipeline state to configure a compute pass by calling the setComputePipelineState(_:) method of an MTLComputeCommandEncoder instance.