<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: 13.1.0 - 27.0.0",
    "macOS: 10.11.0 - 27.0.0",
    "tvOS: -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTLBuffer/didModifyRange:",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "c:objc(pl)MTLBuffer(im)didModifyRange:"
  },
  "title" : "didModifyRange:"
}
-->

# didModifyRange:

Informs the GPU that the CPU has modified a section of the buffer.

```
- (void) didModifyRange:(NSRange) range;
```

## Parameters

`range`

The range of bytes that were modified.

## Discussion

If you write information to a buffer created with the [`MTLStorageMode.managed`](/documentation/Metal/MTLStorageMode/managed) storage mode, you need to call this method to inform the GPU that the information has changed. If you execute GPU commands that read from the modified sections without calling this method first, the behavior is undefined.

---

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)