---
title: counterSet
framework: metal
role: symbol
role_heading: Instance Property
path: metal/mtlcountersamplebufferdescriptor/counterset
---

# counterSet

A GPU device’s counter set instance that you want to sample.

## Declaration

```swift
var counterSet: (any MTLCounterSet)? { get set }
```

## Discussion

Discussion Assign this property to one of the counter sets in an MTLDevice instance’s counterSets property.

## See Also

### Configuring a descriptor for a counter sample buffer

- [label](metal/mtlcountersamplebufferdescriptor/label.md)
- [sampleCount](metal/mtlcountersamplebufferdescriptor/samplecount.md)
- [storageMode](metal/mtlcountersamplebufferdescriptor/storagemode.md)
