---
title: depthFailureOperation
framework: metal
role: symbol
role_heading: Instance Property
path: metal/mtlstencildescriptor/depthfailureoperation
---

# depthFailureOperation

The operation that is performed to update the values in the stencil attachment when the stencil test passes, but the depth test fails.

## Declaration

```swift
var depthFailureOperation: 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)
- [depthStencilPassOperation](metal/mtlstencildescriptor/depthstencilpassoperation.md)
- [stencilCompareFunction](metal/mtlstencildescriptor/stencilcomparefunction.md)
- [MTLStencilOperation](metal/mtlstenciloperation.md)
