<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTLComputePipelineDescriptor",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "c:objc(cs)MTLComputePipelineDescriptor"
  },
  "title" : "MTLComputePipelineDescriptor"
}
-->

# MTLComputePipelineDescriptor

An instance describing the desired GPU state for a kernel call in a compute pass.

```
class MTLComputePipelineDescriptor
```

## Overview> Important:
> Before creating a pipeline state, set the ``doc://com.apple.metal/documentation/Metal/MTLComputePipelineDescriptor/computeFunction`` property on your descriptor instance. This property tells the GPU which kernel to run.

A pipeline descriptor provides information necessary for creating an [`MTLComputePipelineState`](/documentation/Metal/MTLComputePipelineState) instance.

## Topics

### Configuring the compute execution environment

[`computeFunction`](/documentation/Metal/MTLComputePipelineDescriptor/computeFunction)

The compute kernel the pipeline calls.

[`threadGroupSizeIsMultipleOfThreadExecutionWidth`](/documentation/Metal/MTLComputePipelineDescriptor/threadGroupSizeIsMultipleOfThreadExecutionWidth)

A Boolean value that indicates whether the threadgroup size is always a multiple of the thread execution width.

[`maxTotalThreadsPerThreadgroup`](/documentation/Metal/MTLComputePipelineDescriptor/maxTotalThreadsPerThreadgroup)

A property that limits the number of threads you can dispatch in a threadgroup for the compute function.

[`maxCallStackDepth`](/documentation/Metal/MTLComputePipelineDescriptor/maxCallStackDepth)

The maximum call stack depth for indirect function calls in compute shaders.

### Configuring compute pass inputs

[`stageInputDescriptor`](/documentation/Metal/MTLComputePipelineDescriptor/stageInputDescriptor)

The organization of input and output data for the next kernel call.

[`MTLAttributeDescriptor`](/documentation/Metal/MTLAttributeDescriptor)

A descriptor of an argument’s format and where its data is in memory.

[`MTLAttributeDescriptorArray`](/documentation/Metal/MTLAttributeDescriptorArray)

An array of attribute descriptor objects.

[`MTLBufferLayoutDescriptor`](/documentation/Metal/MTLBufferLayoutDescriptor)

A description of how a compute function fetches input data for an attribute.

[`MTLBufferLayoutDescriptorArray`](/documentation/Metal/MTLBufferLayoutDescriptorArray)

An array of buffer layout descriptor objects.

### Configuring buffer mutability

[`buffers`](/documentation/Metal/MTLComputePipelineDescriptor/buffers)

The buffer mutability options to apply to the next kernel call.

### Identifying the pipeline state object

[`label`](/documentation/Metal/MTLComputePipelineDescriptor/label)

A string that identifies the instance.

### Configuring indirect command buffers

[`supportIndirectCommandBuffers`](/documentation/Metal/MTLComputePipelineDescriptor/supportIndirectCommandBuffers)

A Boolean value that indicates whether you can encode commands that reference the pipeline state object into an indirect command buffer.

### Configuring shader validation

[`shaderValidation`](/documentation/Metal/MTLComputePipelineDescriptor/shaderValidation)

A value that enables or disables shader validation for the pipeline.

### Reset to defaults

[`reset()`](/documentation/Metal/MTLComputePipelineDescriptor/reset())

Resets all compute pipeline descriptor properties to their default values.

### Loading dynamic libraries to link at runtime

[`preloadedLibraries`](/documentation/Metal/MTLComputePipelineDescriptor/preloadedLibraries)

The dynamic libraries that contain precompiled shader functions you want to link.

[`insertLibraries`](/documentation/Metal/MTLComputePipelineDescriptor/insertLibraries)

The dynamic libraries that contain precompiled shader functions you want to link.

### Setting callable functions

[`linkedFunctions`](/documentation/Metal/MTLComputePipelineDescriptor/linkedFunctions)

The functions with available function pointers for the next kernel call.

### Loading binary archives

[`supportAddingBinaryFunctions`](/documentation/Metal/MTLComputePipelineDescriptor/supportAddingBinaryFunctions)

A Boolean value that indicates whether you can use the pipeline to create new pipelines by adding binary functions to its callable functions list.

[`binaryArchives`](/documentation/Metal/MTLComputePipelineDescriptor/binaryArchives)

The binary archives that contain any precompiled shader functions to link.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)