---
title: MTLCounterSampleBufferDescriptor
framework: metal
role: symbol
role_heading: Class
path: metal/mtlcountersamplebufferdescriptor
---

# MTLCounterSampleBufferDescriptor

A group of properties that configures the counter sample buffers you create with it.

## Declaration

```swift
class MTLCounterSampleBufferDescriptor
```

## Mentioned in

Creating a counter sample buffer to store a GPU’s counter data during a pass

## Overview

Overview To create a new counter sample buffer, create and configure an MTLCounterSampleBufferDescriptor instance, and then call an MTLDevice instance’s makeCounterSampleBuffer(descriptor:) method. See Creating a counter sample buffer to store a GPU’s counter data during a pass. Each new sample counter buffer inherits the values of the descriptor’s properties when you create it. You can modify a descriptor and reuse it to create other counter sample buffers, which has no effect on existing counter sample buffers.

## Topics

### Configuring a descriptor for a counter sample buffer

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

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCopying](foundation/nscopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Counter sample buffers

- [Creating a counter sample buffer to store a GPU’s counter data during a pass](metal/creating-a-counter-sample-buffer-to-store-a-gpus-counter-data-during-a-pass.md)
- [MTLCounterSampleBuffer](metal/mtlcountersamplebuffer.md)
- [Sampling GPU data into counter sample buffers](metal/sampling-gpu-data-into-counter-sample-buffers.md)
- [MTLCounterDontSample](metal/mtlcounterdontsample.md)
