From 36f10df775cf0c678548b97346432095823dfd8a Mon Sep 17 00:00:00 2001 From: riperiperi Date: Mon, 1 May 2023 19:32:32 +0100 Subject: GPU: Fix errors handling texture remapping (#4745) * GPU: Fix errors handling texture remapping - Fixes an error where a pool entry and memory mapping changing at the same time could cause a texture to rebind its data from the wrong GPU VA (data swaps) - Fixes an error where the texture pool could act on a mapping change before the mapping has actually been changed ("Unmapped" event happens before change, we need to signal it changed _after_ it completes) TODO: remove textures from partially mapped list... if they aren't. * Add Remap actions for handling post-mapping behaviours * Remove unused code. * Address feedback * Nit --- src/Ryujinx.Memory/Range/MemoryRange.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/Ryujinx.Memory/Range/MemoryRange.cs') diff --git a/src/Ryujinx.Memory/Range/MemoryRange.cs b/src/Ryujinx.Memory/Range/MemoryRange.cs index 7465fbcb..c7ee6db2 100644 --- a/src/Ryujinx.Memory/Range/MemoryRange.cs +++ b/src/Ryujinx.Memory/Range/MemoryRange.cs @@ -57,5 +57,19 @@ return thisAddress < otherEndAddress && otherAddress < thisEndAddress; } + + /// + /// Returns a string summary of the memory range. + /// + /// A string summary of the memory range + public override string ToString() + { + if (Address == ulong.MaxValue) + { + return $"[Unmapped 0x{Size:X}]"; + } + + return $"[0x{Address:X}, 0x{EndAddress:X})"; + } } } -- cgit v1.2.3