---
title: startOfFragmentSampleIndex
framework: metal
role: symbol
role_heading: Instance Property
path: metal/mtlrenderpasssamplebufferattachmentdescriptor/startoffragmentsampleindex
---

# startOfFragmentSampleIndex

The index the Metal device object should use to store GPU counters when starting the render pass’s fragment stage.

## Declaration

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

## Mentioned in

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

## Discussion

Discussion Specify MTLCounterDontSample if you don’t want to sample GPU counters at the start of the fragment stage. Otherwise, specify an index within the sample buffer where you want the GPU to write the sample data. On devices that don’t support MTLCounterSamplingPoint.atStageBoundary you need to set the value to MTLCounterDontSample.

## See Also

### Configuring the sample buffer attachment

- [sampleBuffer](metal/mtlrenderpasssamplebufferattachmentdescriptor/samplebuffer.md)
- [startOfVertexSampleIndex](metal/mtlrenderpasssamplebufferattachmentdescriptor/startofvertexsampleindex.md)
- [endOfVertexSampleIndex](metal/mtlrenderpasssamplebufferattachmentdescriptor/endofvertexsampleindex.md)
- [endOfFragmentSampleIndex](metal/mtlrenderpasssamplebufferattachmentdescriptor/endoffragmentsampleindex.md)
