---
title: "setDepthStencilState(_:index:)"
framework: metal
role: symbol
role_heading: Instance Method
path: "metal/mtlargumentencoder/setdepthstencilstate(_:index:)"
---

# setDepthStencilState(_:index:)

## Declaration

```swift
func setDepthStencilState(_ depthStencilState: (any MTLDepthStencilState)?, index: Int)
```

## Discussion

Discussion Sets a depth stencil state at a given bind point index
