MTLRenderPipelineState
An interface that represents a graphics pipeline configuration for a render pass, which the pass applies to the draw commands you encode.
Declaration
protocol MTLRenderPipelineState : MTLAllocation, SendableMentioned in
Overview
The MTLRenderPipelineState protocol is an interface that represents a specific configuration for the graphics-rendering pipeline, including which shaders it uses. Use a pipeline state to configure a render pass by calling the setRenderPipelineState(_:) method of an MTLRenderCommandEncoder instance.
To create a pipeline state, call the appropriate MTLDevice method (see Pipeline state creation). You typically make pipeline states at a noncritical time, like when the app first launches. This is because graphics drivers may need time to evaluate and build each pipeline state. However, you can quickly use and reuse each pipeline state throughout your app’s lifetime.
Topics
Identifying a pipeline state
Checking object shader memory requirements
Checking mesh shader memory requirements
Checking tile shader memory requirements
maxTotalThreadsPerThreadgroupthreadgroupSizeMatchesTileSizeimageblockSampleLengthimageblockMemoryLength(forDimensions:)
Checking feature support
Checking shader validation
Creating function handles and tables
functionHandle(function:stage:)makeVisibleFunctionTable(descriptor:stage:)makeIntersectionFunctionTable(descriptor:stage:)
Creating modified clones of the render pipeline
Instance Properties
reflectionrequiredThreadsPerMeshThreadgrouprequiredThreadsPerObjectThreadgrouprequiredThreadsPerTileThreadgroup
Instance Methods
See Also
Render pipeline states
MTL4RenderPipelineDescriptorMTLRenderPipelineDescriptorMTLRenderPipelineFunctionsDescriptorMTL4MeshRenderPipelineDescriptorMTLMeshRenderPipelineDescriptorMTLPipelineBufferDescriptorMTLPipelineBufferDescriptorArrayMTL4RenderPipelineColorAttachmentDescriptorMTLRenderPipelineColorAttachmentDescriptorMTLRenderPipelineColorAttachmentDescriptorArrayMTL4TileRenderPipelineDescriptorMTLTileRenderPipelineDescriptorMTLTileRenderPipelineColorAttachmentDescriptorMTLPipelineOptionMTL4RenderPipelineBinaryFunctionsDescriptor