---
title: MTLComputePassSampleBufferAttachmentDescriptor
framework: metal
role: symbol
role_heading: Class
path: metal/mtlcomputepasssamplebufferattachmentdescriptor
---

# MTLComputePassSampleBufferAttachmentDescriptor

A configuration that instructs the GPU where to store counter data from the beginning and end of a compute pass.

## Declaration

```swift
class MTLComputePassSampleBufferAttachmentDescriptor
```

## Mentioned in

Sampling GPU data into counter sample buffers

## Overview

Overview For more context about configuring sample buffer attachments for compute passes, see Sampling GPU data into counter sample buffers. That article is one of a series in GPU counters and counter sample buffers about sampling Metal hardware counters for performance measurement.

## Topics

### Configuring the sample buffer attachment

- [sampleBuffer](metal/mtlcomputepasssamplebufferattachmentdescriptor/samplebuffer.md)
- [startOfEncoderSampleIndex](metal/mtlcomputepasssamplebufferattachmentdescriptor/startofencodersampleindex.md)
- [endOfEncoderSampleIndex](metal/mtlcomputepasssamplebufferattachmentdescriptor/endofencodersampleindex.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

### Configuring a compute pass

- [MTLComputePassDescriptor](metal/mtlcomputepassdescriptor.md)
- [MTLDispatchType](metal/mtldispatchtype.md)
- [MTLDispatchThreadgroupsIndirectArguments](metal/mtldispatchthreadgroupsindirectarguments.md)
- [MTLComputePassSampleBufferAttachmentDescriptorArray](metal/mtlcomputepasssamplebufferattachmentdescriptorarray.md)
