<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTL4BufferRange",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "c:@S@MTL4BufferRange"
  },
  "title" : "MTL4BufferRange"
}
-->

# MTL4BufferRange

```
struct MTL4BufferRange
```

## Overview\abstract A struct representing a range of a Metal buffer. The offset into the buffer is included in the address.
The length is generally optional, which a value of (uint64_t)-1 representing the range from the given address to
the end of the buffer. However, providing the length can enable more accurate API validation, especially when
sub-allocating ranges of a buffer.

---

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)