Contents

MTLComputePipelineState

An interface that represents a GPU pipeline configuration for running kernels in a compute pass.

Declaration

protocol MTLComputePipelineState : MTLAllocation, Sendable

Mentioned 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.

Topics

Identifying a pipeline state

Checking threadgroup attributes

Checking imageblock attributes

Checking indirect command buffer support

Checking shader validation

Creating function handles

Adding visible functions

Creating function tables

Instance Properties

Instance Methods

See Also

Configuring a compute pipeline state