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

# device

The device object that created the sampler.

## Declaration

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

## Discussion

Discussion A sampler is always associated with the MTLDevice that created it and can be used only with that device.

## See Also

### Identifying the sampler

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