Informs the GPU that the CPU has modified a section of the buffer.
Required.
SDKs
- macOS 10.11+
- Mac Catalyst 13.0+
Framework
- Metal
Declaration
- (void)didModifyRange:(NSRange)range;
Parameters
range
The range of bytes that were modified.
Discussion
If you write information to a buffer created with the MTLStorage
storage mode, you must 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.