Contents

setComputePipelineState(_:)

Configures the compute encoder with a pipeline state for subsequent kernel calls.

Declaration

func setComputePipelineState(_ state: any MTLComputePipelineState)

Parameters

Discussion

Create your pipeline state through one of the MTLDevice methods in Creating Compute Pipeline States.

A compute pipeline state provides information Metal uses to compile and run encoded commands. You can change the pipeline state at any time, allowing you to encode multiple kernel calls in a single command buffer. Changing the pipeline state doesn’t affect any previously encoded commands.

See Also

Configuring the pipeline state