diff options
author | gdkchan <gab.dark.100@gmail.com> | 2022-02-22 13:34:16 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-22 13:34:16 -0300 |
commit | 0a24aa6af26cc55c079e265a071a42569d28d2c0 (patch) | |
tree | c0652d606c253f3575cf33b592d2ae3d34b71000 /Ryujinx.Memory/Range/MemoryRange.cs | |
parent | c9c65af59edea05e7206a076cb818128c004384e (diff) |
Allow textures to have their data partially mapped (#2629)1.1.52
* Allow textures to have their data partially mapped
* Explicitly check for invalid memory ranges on the MultiRangeList
* Update GetWritableRegion to also support unmapped ranges
Diffstat (limited to 'Ryujinx.Memory/Range/MemoryRange.cs')
-rw-r--r-- | Ryujinx.Memory/Range/MemoryRange.cs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Ryujinx.Memory/Range/MemoryRange.cs b/Ryujinx.Memory/Range/MemoryRange.cs index ba12bae5..33d2439f 100644 --- a/Ryujinx.Memory/Range/MemoryRange.cs +++ b/Ryujinx.Memory/Range/MemoryRange.cs @@ -50,6 +50,13 @@ namespace Ryujinx.Memory.Range ulong otherAddress = other.Address; ulong otherEndAddress = other.EndAddress; + // If any of the ranges if invalid (address + size overflows), + // then they are never considered to overlap. + if (thisEndAddress < thisAddress || otherEndAddress < otherAddress) + { + return false; + } + return thisAddress < otherEndAddress && otherAddress < thisEndAddress; } |