<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 11.0.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTLRenderPassSampleBufferAttachmentDescriptor/startOfFragmentSampleIndex",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "c:objc(cs)MTLRenderPassSampleBufferAttachmentDescriptor(py)startOfFragmentSampleIndex"
  },
  "title" : "startOfFragmentSampleIndex"
}
-->

# startOfFragmentSampleIndex

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

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

## Discussion

Specify [`MTLCounterDontSample`](/documentation/Metal/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`](/documentation/Metal/MTLCounterSamplingPoint/atStageBoundary) you need to set the value to [`MTLCounterDontSample`](/documentation/Metal/MTLCounterDontSample).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)