/// <summary> /// Action to be performed when a syncpoint is reached after modification. /// This will register read/write tracking to flush the buffer from GPU when its memory is used. /// </summary> private void SyncAction() { _syncActionRegistered = false; if (_useGranular) { _modifiedRanges.GetRanges(Address, Size, (address, size) => { _memoryTrackingGranular.RegisterAction(address, size, _externalFlushDelegate); SynchronizeMemory(address, size); }); } else { _memoryTracking.RegisterAction(_externalFlushDelegate); SynchronizeMemory(Address, Size); } }