Sets the current compute pipeline state object.
Required.
SDKs
- iOS 8.0+
- macOS 10.11+
- Mac Catalyst 13.0+
- tvOS 9.0+
Framework
- Metal
Declaration
- (void)setComputePipelineState:(id<MTLCompute Pipeline State>)state;
Parameters
state
The
MTLCompute
object with the compute function that will be executed.Pipeline State
Discussion
You must set a compute pipeline state before encoding any commands to dispatch compute kernels.
If the value of state
is nil
, an error occurs.