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

# MTLComputePassSampleBufferAttachmentDescriptorArray

A container that stores an array of sample buffer attachments for a compute pass.

```
class MTLComputePassSampleBufferAttachmentDescriptorArray
```

## Overview

The number of elements in the array is at least the number of elements in an [`MTLDevice`](/documentation/Metal/MTLDevice) instance’s [`counterSets`](/documentation/Metal/MTLDevice/counterSets) property.

## Topics

### Accessing a sample buffer attachment

[`subscript(_:)`](/documentation/Metal/MTLComputePassSampleBufferAttachmentDescriptorArray/subscript(_:))

Returns the descriptor object for the specified sample buffer attachment.

[`setObject:atIndexedSubscript:`](/documentation/Metal/MTLComputePassSampleBufferAttachmentDescriptorArray/setObject:atIndexedSubscript:)

Sets the descriptor object for the specified sample buffer attachment.



---

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)