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

# device

The device object that created the argument encoder.

## Declaration

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

## Discussion

Discussion You can only use the encoder to encode data into buffers created by the same Metal device object.

## See Also

### Identifying the argument encoder

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