An object used to encode commands in a compute pass.
- iOS 8.0+
- macOS 10.11+
- tvOS 9.0+
Don't implement this protocol yourself; instead, create compute command encoders by calling the
make method of the
MTLCommand object into which you want to encode compute commands. You can encode multiple commands in a single compute pass.
To encode a compute command:
Call one or more other functions on the encoder to specify parameters for the compute function.
dispatchmethod to encode a compute command.
Threadgroups(_: threads Per Threadgroup:)
After repeating these steps as many times as necessary, call
end to finish the compute pass. You must always call
end before the encoder is released or before creating another encoder.