mirror of
https://github.com/GreemDev/Ryujinx.git
synced 2024-12-22 18:05:46 +00:00
Fix off by one error in pages count calculation on GPU pool (#1511)
This commit is contained in:
parent
000ba5f7cc
commit
09341dc11d
1 changed files with 6 additions and 1 deletions
|
@ -1,3 +1,4 @@
|
|||
using Ryujinx.Common;
|
||||
using Ryujinx.Graphics.Gpu.Memory;
|
||||
using System;
|
||||
|
||||
|
@ -49,7 +50,11 @@ namespace Ryujinx.Graphics.Gpu.Image
|
|||
Address = address;
|
||||
Size = size;
|
||||
|
||||
_modifiedRanges = new (ulong, ulong)[size / PhysicalMemory.PageSize];
|
||||
ulong endAddress = BitUtils.AlignUp(Address + Size, PhysicalMemory.PageSize);
|
||||
|
||||
ulong pagesCount = (endAddress - BitUtils.AlignDown(Address, PhysicalMemory.PageSize)) / PhysicalMemory.PageSize;
|
||||
|
||||
_modifiedRanges = new (ulong, ulong)[pagesCount];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
Loading…
Reference in a new issue