diff --git a/zzre.core/rendering/DynamicGraphicsBuffer.cs b/zzre.core/rendering/DynamicGraphicsBuffer.cs index 904b3ec7..4af25662 100644 --- a/zzre.core/rendering/DynamicGraphicsBuffer.cs +++ b/zzre.core/rendering/DynamicGraphicsBuffer.cs @@ -146,6 +146,9 @@ public void Update(CommandList cl) buffer?.Dispose(); buffer = device.ResourceFactory.CreateBuffer(new((uint)capacityInBytes, usage)); buffer.Name = bufferName; + dirtyBytes.Clear(); + foreach (var usedElementRange in usedElements) + dirtyBytes.Add(AsByteRange(usedElementRange)); } dirtyBytes.MergeNearbyRanges(MaxUploadDistance);