Protocol

MTLParallelRenderCommandEncoder

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

Declaration

@protocol MTLParallelRenderCommandEncoder

Overview

Your app does not define classes that implement this protocol. To create a MTLParallelRenderCommandEncoder object, call the parallelRenderCommandEncoderWithDescriptor: method of the MTLCommandBuffer object that you want to encode the rendering commands into. Then, call the renderCommandEncoder method on this MTLParallelRenderCommandEncoder object to create one or more MTLRenderCommandEncoder objects. The subordinate MTLRenderCommandEncoder objects created encode their commands to the same command buffer and target the same MTLRenderPassAttachmentDescriptor object. The MTLParallelRenderCommandEncoder object 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

- renderCommandEncoder

Create an object that encodes commands that perform graphics rendering operations and may be assigned to a different thread.

Required.

Setting Render Pass State

- setColorStoreAction:atIndex:

Specifies a known store action to replace the initial MTLStoreActionUnknown value specified for a given color attachment.

Required.

- setColorStoreActionOptions:atIndex:

Specifies known store action options for a given color attachment.

Required.

- setDepthStoreAction:

Specifies a known store action to replace the initial MTLStoreActionUnknown value specified for a given depth attachment.

Required.

- setDepthStoreActionOptions:

Specifies known store action options for a given depth attachment.

Required.

- setStencilStoreAction:

Specifies a known store action to replace the initial MTLStoreActionUnknown value specified for a given stencil attachment.

Required.

- setStencilStoreActionOptions:

Specifies known store action options for a given stencil attachment.

Required.

Relationships

Inherits From

See Also

Rendering

Creating and Sampling Textures

Load image data into a texture and apply it to a quadrangle.

Generating Multiple Output Vertex Streams from One Input Stream

Render efficiently to multiple layers or viewports.

Render Pipelines

Specify how graphics primitives should be rendered.

MTLRenderPassDescriptor

A group of render targets that hold the results of a render pass.

MTLRenderCommandEncoder

The object to use for encoding commands for a render pass.

Model I/O

Specify precise locations within the textures associated with graphics processing.