Instance Method

setComputePipelineState:

Sets the current compute pipeline state object.

Required.

Declaration

- (void)setComputePipelineState:(id<MTLComputePipelineState>)state;

Parameters

state

The MTLComputePipelineState object with the compute function that will be executed.

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.