---
title: endOfEncoderSampleIndex
framework: metal
role: symbol
role_heading: Instance Property
path: metal/mtlcomputepasssamplebufferattachmentdescriptor/endofencodersampleindex
---

# endOfEncoderSampleIndex

An index within a counter sample buffer that tells the GPU where to store counter data from the end of a compute pass.

## Declaration

```swift
var endOfEncoderSampleIndex: Int { get set }
```

## Mentioned in

Sampling GPU data into counter sample buffers

## Discussion

Discussion This property indicates where the GPU stores the counter data within an MTLCounterSampleBuffer instance that it samples at the end of a compute pass. You can tell the GPU to skip sampling at the end of the compute pass by assigning MTLCounterDontSample to this property. important: For MTLDevice instances that don’t support MTLCounterSamplingPoint.atStageBoundary (see supportsCounterSampling(_:)), set this property to MTLCounterDontSample.

## See Also

### Configuring the sample buffer attachment

- [sampleBuffer](metal/mtlcomputepasssamplebufferattachmentdescriptor/samplebuffer.md)
- [startOfEncoderSampleIndex](metal/mtlcomputepasssamplebufferattachmentdescriptor/startofencodersampleindex.md)
