MTLComputePipelineState
An interface that represents a GPU pipeline configuration for running kernels in a compute pass.
Declaration
protocol MTLComputePipelineState : MTLAllocation, SendableMentioned in
Overview
The MTLComputePipelineState protocol is an interface that represents a specific configuration for the GPU pipeline for a compute pass. Use a pipeline state to configure a compute pass by calling the setComputePipelineState(_:) method of an MTLComputeCommandEncoder 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 your 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.