makeRenderPipelineState(descriptor:options:reflection:)
Synchronously creates a render pipeline state and reflection information.
Declaration
func makeRenderPipelineState(descriptor: MTLRenderPipelineDescriptor, options: MTLPipelineOption, reflection: AutoreleasingUnsafeMutablePointer<MTLAutoreleasedRenderPipelineReflection?>?) throws -> any MTLRenderPipelineStateParameters
- descriptor:
An Mtlrenderpipelinedescriptor instance.
- options:
An Mtlpipelineoption instance that represents the reflection information you want the method to generate.
- reflection:
In Swift, an optional pointer to an Mtlautoreleasedrenderpipelinereflection optional. In Objective-C, a pointer to an Mtlautoreleasedrenderpipelinereflection instance.
Pass
nilin either language when you don’t need reflection data. Otherwise on return, if the method completes successfully, it assigns an Mtlrenderpipelinereflection instance to the pointee, which contains the details about the function arguments.
Return Value
A new MTLRenderPipelineState instance if the method completes successfully; otherwise Swift throws an error and Objective-C returns nil.
Discussion
Use the graphics-rendering pipeline state to configure a render pass by calling the setRenderPipelineState(_:) method of an MTLRenderCommandEncoder instance.