An object that splits up a single render pass so it can be simultaneously encoded from multiple threads.
- iOS 8.0+
- macOS 10.11+
- UIKit for Mac 13.0+Beta
- tvOS 9.0+
Your app does not define classes that implement this protocol. To create a
MTLParallel object, call the
parallel method of the
MTLCommand object that you want to encode the rendering commands into. Then, call the renderCommandEncoder method on this
MTLParallel object to create one or more
MTLRender objects. The subordinate
MTLRender objects created encode their commands to the same command buffer and target the same
MTLRender object. The
MTLParallel object ensures the attachment load and store actions only occur at the start and end of the entire rendering pass.
You can assign each
MTLRender 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
end to execute the commands. The rendering commands are executed in the order that the subordinate encoders were created.