Pipeline state creation
Create pipeline states for render and compute passes, samplers, depth and stencil states, and indirect command buffers.
Overview
Use these methods to create instances of various state types for a render or compute pass (see Render passes and Compute passes, respectively).
You can create multiple MTLRenderPipelineState instances for a single render pass encoder (MTLRenderCommandEncoder) that each apply to different types of render commands. For example, a single render pass can render primitives with vertices, then meshes, and finish with a tile shader command, each with a different pipeline. To create these pipelines, configure instances of MTLRenderPipelineDescriptor, MTLMeshRenderPipelineDescriptor, and MTLTileRenderPipelineDescriptor. Then pass those descriptors to the makeRenderPipelineState(descriptor:completionHandler:), makeRenderPipelineState(descriptor:options:completionHandler:) and makeRenderPipelineState(tileDescriptor:options:completionHandler:) methods (or a counterpart method), respectively.
Topics
Creating render pipeline states with vertex shaders
makeRenderPipelineState(descriptor:)makeRenderPipelineState(descriptor:completionHandler:)makeRenderPipelineState(descriptor:options:)makeRenderPipelineState(descriptor:options:reflection:)makeRenderPipelineState(descriptor:options:completionHandler:)
Creating render pipeline states with mesh shaders
makeRenderPipelineState(descriptor:options:)makeRenderPipelineState(descriptor:options:completionHandler:)
Creating tile render pipeline states
makeRenderPipelineState(tileDescriptor:options:)makeRenderPipelineState(tileDescriptor:options:reflection:)makeRenderPipelineState(tileDescriptor:options:completionHandler:)
Creating compute pipeline states
makeComputePipelineState(descriptor:options:reflection:)makeComputePipelineState(descriptor:options:completionHandler:)makeComputePipelineState(function:)makeComputePipelineState(function:completionHandler:)makeComputePipelineState(function:options:reflection:)makeComputePipelineState(function:options:completionHandler:)