---
title: device
framework: metal
role: symbol
role_heading: Instance Property
path: metal/mtldepthstencilstate/device
---

# device

The device from which this state object was created.

## Declaration

```swift
var device: any MTLDevice { get }
```

## Discussion

Discussion This state object can only be used with this device.

## See Also

### Related Documentation

- [Metal Shading Language Guide](apple-archive/documentation/Metal/Reference/MetalShadingLanguageGuide/Introduction.md)
- [Metal Programming Guide](apple-archive/documentation/Miscellaneous/Conceptual/MetalProgrammingGuide/Introduction.md)

### Identifying properties

- [label](metal/mtldepthstencilstate/label.md)
