setComputePipelineState(_:)
Sets the command’s compute pipeline state.
Declaration
func setComputePipelineState(_ pipelineState: any MTLComputePipelineState)Parameters
- pipelineState:
A compute pipeline state instance.
Discussion
You don’t need to call this method if you create an indirect command buffer with its inheritPipelineState property equal to true. The command gets the pipeline state from the parent encoder when you run the command.
If you create an indirect command buffer with its inheritPipelineState property equal to false, you need to set the pipeline state prior to encoding a drawing command.