---
title: isDepthWriteEnabled
framework: metal
role: symbol
role_heading: Instance Property
path: metal/mtldepthstencildescriptor/isdepthwriteenabled
---

# isDepthWriteEnabled

A Boolean value that indicates whether depth values can be written to the depth attachment.

## Declaration

```swift
var isDepthWriteEnabled: Bool { get set }
```

## Discussion

Discussion The default value is false, which indicates the depth attachment is read-only.

## See Also

### Specifying depth operations

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