---
title: depthStencilPassOperation
framework: metal
role: symbol
role_heading: Instance Property
path: metal/mtlstencildescriptor/depthstencilpassoperation
---

# depthStencilPassOperation

The operation that is performed to update the values in the stencil attachment when both the stencil test and the depth test pass.

## Declaration

```swift
var depthStencilPassOperation: MTLStencilOperation { get set }
```

## Discussion

Discussion The default value is MTLStencilOperation.keep, which does not change the current stencil value. For more information on possible values, see MTLStencilOperation.

## See Also

### Related Documentation

- [depthCompareFunction](metal/mtldepthstencildescriptor/depthcomparefunction.md)

### Configuring stencil functions and operations

- [stencilFailureOperation](metal/mtlstencildescriptor/stencilfailureoperation.md)
- [depthFailureOperation](metal/mtlstencildescriptor/depthfailureoperation.md)
- [stencilCompareFunction](metal/mtlstencildescriptor/stencilcomparefunction.md)
- [MTLStencilOperation](metal/mtlstenciloperation.md)
