<!--
{
  "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",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "c:objc(cs)MTLRenderPassSampleBufferAttachmentDescriptor"
  },
  "title" : "MTLRenderPassSampleBufferAttachmentDescriptor"
}
-->

# MTLRenderPassSampleBufferAttachmentDescriptor

A description of where to store GPU counter information at the start and end of a render pass.

```
class MTLRenderPassSampleBufferAttachmentDescriptor
```

## Topics

### Configuring the sample buffer attachment

[`sampleBuffer`](/documentation/Metal/MTLRenderPassSampleBufferAttachmentDescriptor/sampleBuffer)

A specialized memory buffer that the GPU uses to store its counter data during the render pass.

[`startOfVertexSampleIndex`](/documentation/Metal/MTLRenderPassSampleBufferAttachmentDescriptor/startOfVertexSampleIndex)

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

[`endOfVertexSampleIndex`](/documentation/Metal/MTLRenderPassSampleBufferAttachmentDescriptor/endOfVertexSampleIndex)

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

[`startOfFragmentSampleIndex`](/documentation/Metal/MTLRenderPassSampleBufferAttachmentDescriptor/startOfFragmentSampleIndex)

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

[`endOfFragmentSampleIndex`](/documentation/Metal/MTLRenderPassSampleBufferAttachmentDescriptor/endOfFragmentSampleIndex)

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



---

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)