diff options
| author | riperiperi <rhy3756547@hotmail.com> | 2023-05-01 19:32:32 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-05-01 15:32:32 -0300 |
| commit | 36f10df775cf0c678548b97346432095823dfd8a (patch) | |
| tree | 7a9c18eb0c50751082e5d8ad6d0b60c00e653e38 /src/Ryujinx.Memory | |
| parent | 680e54802234c37b9e46633db328b3ecd1dd1f86 (diff) | |
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
Diffstat (limited to 'src/Ryujinx.Memory')
| -rw-r--r-- | src/Ryujinx.Memory/Range/MemoryRange.cs | 14 | ||||
| -rw-r--r-- | src/Ryujinx.Memory/Range/MultiRange.cs | 9 |
2 files changed, 23 insertions, 0 deletions
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; } + + /// <summary> + /// Returns a string summary of the memory range. + /// </summary> + /// <returns>A string summary of the memory range</returns> + public override string ToString() + { + if (Address == ulong.MaxValue) + { + return $"[Unmapped 0x{Size:X}]"; + } + + return $"[0x{Address:X}, 0x{EndAddress:X})"; + } } } diff --git a/src/Ryujinx.Memory/Range/MultiRange.cs b/src/Ryujinx.Memory/Range/MultiRange.cs index 9dbd76ec..42ef24be 100644 --- a/src/Ryujinx.Memory/Range/MultiRange.cs +++ b/src/Ryujinx.Memory/Range/MultiRange.cs @@ -319,5 +319,14 @@ namespace Ryujinx.Memory.Range return hash.ToHashCode(); } + + /// <summary> + /// Returns a string summary of the ranges contained in the MultiRange. + /// </summary> + /// <returns>A string summary of the ranges contained within</returns> + public override string ToString() + { + return HasSingleRange ? _singleRange.ToString() : string.Join(", ", _ranges); + } } } |
