---
title: "setRenderPipelineState(_:)"
framework: metal
role: symbol
role_heading: Instance Method
path: "metal/mtlindirectrendercommand/setrenderpipelinestate(_:)"
---

# setRenderPipelineState(_:)

Sets the render pipeline state for the command.

## Declaration

```swift
func setRenderPipelineState(_ pipelineState: any MTLRenderPipelineState)
```

## Parameters

- `pipelineState`: The rendering pipeline state object to use.

## Discussion

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 it runs. If you created the indirect command buffer with inheritPipelineState set to false, you need to set the pipeline state prior to encoding the drawing command.

## See Also

### Setting command arguments

- [setVertexBuffer(_:offset:at:)](metal/mtlindirectrendercommand/setvertexbuffer(_:offset:at:).md)
- [setFragmentBuffer(_:offset:at:)](metal/mtlindirectrendercommand/setfragmentbuffer(_:offset:at:).md)
