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

# device

The GPU device instance that owns the counter sample buffer.

## Declaration

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

## Discussion

Discussion You can store a GPU device’s counter set data only with a counter sample buffer that you create from the same device.

## See Also

### Inspecting the counter sample buffer’s configuration

- [label](metal/mtlcountersamplebuffer/label.md)
- [sampleCount](metal/mtlcountersamplebuffer/samplecount.md)
