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

# device

The device object that created the shader function.

## Declaration

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

## Discussion

Discussion You can only use the function handle with this MTLDevice.

## 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)

### Querying handle properties

- [functionType](metal/mtlfunctionhandle/functiontype.md)
- [name](metal/mtlfunctionhandle/name.md)
