<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 26.0.0 -",
    "macOS: 26.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTLStages",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "c:@E@MTLStages"
  },
  "title" : "MTLStages"
}
-->

# MTLStages

The segments of command execution within the Metal pass types.

```
struct MTLStages
```

## Overview

Metal associates each command with one or more stages within a pass.
Use these stage identifiers to synchronize command execution within a pass by selecting which stages wait for other stages to complete.

Metal 4 introduces the following unified command encoders that combine multiple stages into a single pass:

- [`MTL4RenderCommandEncoder`](/documentation/Metal/MTL4RenderCommandEncoder) instances encode render passes that run vertex, fragment, object, mesh, and tile stages.
- [`MTL4ComputeCommandEncoder`](/documentation/Metal/MTL4ComputeCommandEncoder) instances encode unified compute passes that run blit, dispatch, and acceleration structure stages.
- [`MTL4MachineLearningCommandEncoder`](/documentation/Metal/MTL4MachineLearningCommandEncoder) instances encode passes that run machine learning stages.

Metal 3 provides separate command encoders for different types of work:

- [`MTLRenderCommandEncoder`](/documentation/Metal/MTLRenderCommandEncoder) instances encode render passes that run vertex, fragment, object, mesh, and tile stages.
- [`MTLComputeCommandEncoder`](/documentation/Metal/MTLComputeCommandEncoder) instances encode compute passes that run dispatch stages.
- [`MTLBlitCommandEncoder`](/documentation/Metal/MTLBlitCommandEncoder) instances encode blit passes that run blit stages, which initialize and copy data for resources, such as buffers and textures.
- [`MTLAccelerationStructureCommandEncoder`](/documentation/Metal/MTLAccelerationStructureCommandEncoder) instances encode passes that run acceleration structure stages, such as for ray tracing.

## Topics

### Render pass stages

[`vertex`](/documentation/Metal/MTLStages/vertex)

Represents all vertex shader stage work in a render pass.

[`fragment`](/documentation/Metal/MTLStages/fragment)

Represents all fragment shader stage work in a render pass.

[`tile`](/documentation/Metal/MTLStages/tile)

Represents all tile shading stage work in a render pass.

[`object`](/documentation/Metal/MTLStages/object)

Represents all object shader stage work in a render pass.

[`mesh`](/documentation/Metal/MTLStages/mesh)

Represents all mesh shader stage work work in a render pass.

### Compute pass stages

[`dispatch`](/documentation/Metal/MTLStages/dispatch)

Represents all compute dispatches in a compute pass.

[`blit`](/documentation/Metal/MTLStages/blit)

Represents all blit operations in a pass.

[`accelerationStructure`](/documentation/Metal/MTLStages/accelerationStructure)

Represents all acceleration structure operations.

[`machineLearning`](/documentation/Metal/MTLStages/machineLearning)

Represents all machine learning network dispatch operations.

### Resource pass stages

[`resourceState`](/documentation/Metal/MTLStages/resourceState)

Represents all sparse and placement sparse resource mapping updates.

### Convenience values

[`all`](/documentation/Metal/MTLStages/all)

Convenience mask representing all stages of GPU work.

### Swift support

[`init(rawValue:)`](/documentation/Metal/MTLStages/init(rawValue:))



---

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)