Contents

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

Creating render pipeline states with mesh shaders

Creating tile render pipeline states

Creating compute pipeline states

Creating depth and stencil states

Supporting types

See Also

Working with GPU devices