From 7eb6a731963c0a88876e8155bc44cd163ce058b6 Mon Sep 17 00:00:00 2001 From: LotP1 <68976644+LotP1@users.noreply.github.com> Date: Thu, 27 Nov 2025 03:32:29 +0100 Subject: [PATCH] cleanup logging and debugging --- src/Ryujinx.Graphics.Gpu/Memory/BufferCache.cs | 3 --- .../Memory/BufferModifiedRangeList.cs | 12 ------------ 2 files changed, 15 deletions(-) diff --git a/src/Ryujinx.Graphics.Gpu/Memory/BufferCache.cs b/src/Ryujinx.Graphics.Gpu/Memory/BufferCache.cs index 21d0d9467..83869ed02 100644 --- a/src/Ryujinx.Graphics.Gpu/Memory/BufferCache.cs +++ b/src/Ryujinx.Graphics.Gpu/Memory/BufferCache.cs @@ -2,7 +2,6 @@ using Ryujinx.Graphics.GAL; using Ryujinx.Memory.Range; using System; using System.Collections.Generic; -using System.Diagnostics; using System.Runtime.CompilerServices; namespace Ryujinx.Graphics.Gpu.Memory @@ -596,8 +595,6 @@ namespace Ryujinx.Graphics.Gpu.Memory } while (oldOverlapCount != overlaps.Length); - Debug.Assert(endAddress == overlaps[^1].EndAddress); - ulong newSize = endAddress - address; Buffer[] overlapsArray = overlaps.ToArray(); diff --git a/src/Ryujinx.Graphics.Gpu/Memory/BufferModifiedRangeList.cs b/src/Ryujinx.Graphics.Gpu/Memory/BufferModifiedRangeList.cs index 0cb3f982b..38c33bbca 100644 --- a/src/Ryujinx.Graphics.Gpu/Memory/BufferModifiedRangeList.cs +++ b/src/Ryujinx.Graphics.Gpu/Memory/BufferModifiedRangeList.cs @@ -1,8 +1,6 @@ -using Ryujinx.Common.Logging; using Ryujinx.Memory.Range; using System; using System.Buffers; -using System.Diagnostics; using System.Linq; namespace Ryujinx.Graphics.Gpu.Memory @@ -159,9 +157,6 @@ namespace Ryujinx.Graphics.Gpu.Memory public void SignalModified(ulong address, ulong size) { ulong endAddress = address + size; - - Debug.Assert(endAddress <= _parent.EndAddress); - ulong syncNumber = _context.SyncNumber; // We may overlap with some existing modified regions. They must be cut into by the new entry. Lock.EnterWriteLock(); @@ -174,7 +169,6 @@ namespace Ryujinx.Graphics.Gpu.Memory return; } - Logger.Warning?.Print(LogClass.Gpu, "Signal Modified"); if (first == last) { if (first.Address == address && first.EndAddress == endAddress) @@ -466,13 +460,10 @@ namespace Ryujinx.Graphics.Gpu.Memory /// The action to call for each modified range public void InheritRanges(BufferModifiedRangeList ranges, Action registerRangeAction) { - Logger.Warning?.Print(LogClass.Gpu, "Inherit Ranges"); ranges.Lock.EnterReadLock(); BufferModifiedRange[] inheritRanges = new BufferModifiedRange[ranges.Count]; ranges.Items.AsSpan(0, ranges.Count).CopyTo(inheritRanges); ranges.Lock.ExitReadLock(); - - Debug.Assert(_parent.Address <= ranges._parent.Address && _parent.EndAddress >= ranges._parent.EndAddress); // Copy over the migration from the previous range list @@ -500,7 +491,6 @@ namespace Ryujinx.Graphics.Gpu.Memory foreach (BufferModifiedRange range in inheritRanges) { - Debug.Assert(range.EndAddress <= _parent.EndAddress); Add(range); } @@ -556,7 +546,6 @@ namespace Ryujinx.Graphics.Gpu.Memory { // If the overlap extends outside of the clear range, make sure those parts still exist. - Logger.Warning?.Print(LogClass.Gpu, "Clear Part"); if (overlap.Address < address) { if (overlap.EndAddress > endAddress) @@ -584,7 +573,6 @@ namespace Ryujinx.Graphics.Gpu.Memory /// Size to clear public void Clear(ulong address, ulong size) { - Logger.Warning?.Print(LogClass.Gpu, "Clear"); ulong endAddress = address + size; Lock.EnterWriteLock(); (BufferModifiedRange first, BufferModifiedRange last) = FindOverlapsAsNodes(address, size);