---
title: MTLParallelRenderCommandEncoder
framework: metal
role: symbol
role_heading: Protocol
path: metal/mtlparallelrendercommandencoder
---

# MTLParallelRenderCommandEncoder

An instance that splits up a single render pass so that it can be simultaneously encoded from multiple threads.

## Declaration

```swift
protocol MTLParallelRenderCommandEncoder : MTLCommandEncoder
```

## Mentioned in

Understanding the Metal 4 core API

## Overview

Overview Your app does not define classes that implement this protocol. To create an MTLParallelRenderCommandEncoder instance, call the makeParallelRenderCommandEncoder(descriptor:) method of the MTLCommandBuffer instance that you want to encode the rendering commands into. Then, call the renderCommandEncoder method on this MTLParallelRenderCommandEncoder instance to create one or more MTLRenderCommandEncoder instances. The subordinate MTLRenderCommandEncoder instances created encode their commands to the same command buffer and target the same MTLRenderPassAttachmentDescriptor instance. The MTLParallelRenderCommandEncoder instance ensures the attachment load and store actions only occur at the start and end of the entire rendering pass. You can assign each MTLRenderCommandEncoder to its own thread and each can encode commands in parallel. You are responsible for any thread synchronization that is required. After all the subordinate encoders have finished encoding their commands, call endEncoding() to execute the commands. The rendering commands are executed in the order that the subordinate encoders were created.

## Topics

### Creating a render command encoder

- [makeRenderCommandEncoder()](metal/mtlparallelrendercommandencoder/makerendercommandencoder().md)

### Setting render pass state

- [setColorStoreAction(_:index:)](metal/mtlparallelrendercommandencoder/setcolorstoreaction(_:index:).md)
- [setColorStoreActionOptions(_:index:)](metal/mtlparallelrendercommandencoder/setcolorstoreactionoptions(_:index:).md)
- [setDepthStoreAction(_:)](metal/mtlparallelrendercommandencoder/setdepthstoreaction(_:).md)
- [setDepthStoreActionOptions(_:)](metal/mtlparallelrendercommandencoder/setdepthstoreactionoptions(_:).md)
- [setStencilStoreAction(_:)](metal/mtlparallelrendercommandencoder/setstencilstoreaction(_:).md)
- [setStencilStoreActionOptions(_:)](metal/mtlparallelrendercommandencoder/setstencilstoreactionoptions(_:).md)

## Relationships

### Inherits From

- [MTLCommandEncoder](metal/mtlcommandencoder.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Encoding a render pass in parallel

- [MTLLoadAction](metal/mtlloadaction.md)
- [MTLStoreAction](metal/mtlstoreaction.md)
- [MTLStoreActionOptions](metal/mtlstoreactionoptions.md)
