Instance Method

setComputePipelineState(_:)

Sets the current compute pipeline state object.

Required.

Declaration

func setComputePipelineState(_ state: MTLComputePipelineState)

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.