<!--
{
  "availability" : [
    "Reality Composer Pro: -",
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ComputeGraph",
  "identifier" : "/documentation/ComputeGraph/ComputeNodeGraph/Assembly/BufferBinding",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Compute Graph",
      "ComputeGraph"
    ],
    "preciseIdentifier" : "s:12ComputeGraph0a4NodeB0V8AssemblyV13BufferBindingV"
  },
  "title" : "ComputeNodeGraph.Assembly.BufferBinding"
}
-->

# ComputeNodeGraph.Assembly.BufferBinding

Describes how a Metal buffer is bound to a compute pipeline stage.

```
struct BufferBinding
```

## Overview

A buffer binding pairs an [`ComputeNodeGraph.Assembly.Attachment`](/documentation/ComputeGraph/ComputeNodeGraph/Assembly/Attachment) (how the buffer is connected to the graph)
with an optional [`ComputeNodeGraph.StateType`](/documentation/ComputeGraph/ComputeNodeGraph/StateType) describing the element
layout of the buffer’s contents.

## Topics

### Initializers

[`init(attachment: ComputeNodeGraph.Assembly.Attachment, type: ComputeNodeGraph.StateType?)`](/documentation/ComputeGraph/ComputeNodeGraph/Assembly/BufferBinding/init(attachment:type:))

### Instance Properties

[`var attachment: ComputeNodeGraph.Assembly.Attachment`](/documentation/ComputeGraph/ComputeNodeGraph/Assembly/BufferBinding/attachment)

The attachment point that provides this buffer.

[`var type: ComputeNodeGraph.StateType?`](/documentation/ComputeGraph/ComputeNodeGraph/Assembly/BufferBinding/type)

The element type stored in the buffer, or `nil` if untyped.

## Relationships

### Conforms To

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Equatable`](/documentation/Swift/Equatable)

[`Sendable`](/documentation/Swift/Sendable)

---

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)