diff options
author | gdkchan <gab.dark.100@gmail.com> | 2021-04-24 21:13:58 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-25 02:13:58 +0200 |
commit | 992133e9ca0c3fbd66927b77aed796e29b1f02ef (patch) | |
tree | e4c3498ff675408b8788c938602dea8f47bb9ebc /Ryujinx.HLE | |
parent | 305f06eb71a7832e6b0081a67015b66ced8a23cd (diff) |
Fix IsRegionInUse check on NV memory allocator (#2243)
Diffstat (limited to 'Ryujinx.HLE')
-rw-r--r-- | Ryujinx.HLE/HOS/Services/Nv/NvMemoryAllocator.cs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvMemoryAllocator.cs b/Ryujinx.HLE/HOS/Services/Nv/NvMemoryAllocator.cs index 1f24ab7d..44746db6 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvMemoryAllocator.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvMemoryAllocator.cs @@ -1,6 +1,5 @@ using Ryujinx.Common.Collections; using System.Collections.Generic; -using Ryujinx.Common; using System; using Ryujinx.Graphics.Gpu.Memory; using Ryujinx.Common.Logging; @@ -198,7 +197,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices { bool reachedEndOfAddresses = false; ulong targetAddress; - if(start == DefaultStart) + if (start == DefaultStart) { Logger.Debug?.Print(LogClass.ServiceNv, $"Target address set to start of the last available range: 0x{_list.Last.Value:X}."); targetAddress = _list.Last.Value; @@ -301,7 +300,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices freeAddressStartPosition = floorAddress; if (floorAddress != InvalidAddress) { - return !(gpuVa >= floorAddress && ((gpuVa + size) < _tree.Get(floorAddress))); + return !(gpuVa >= floorAddress && ((gpuVa + size) <= _tree.Get(floorAddress))); } } return true; |