diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2018-04-25 23:11:26 -0300 |
|---|---|---|
| committer | gdkchan <gab.dark.100@gmail.com> | 2018-04-25 23:12:26 -0300 |
| commit | a38a72b0622f89897bdcd01b6d00ea6bc142c34f (patch) | |
| tree | 2025cdddaa7ef6769ac69c51eeede0924ffcba5f /Ryujinx.Graphics/Gpu/NsGpuMemoryMgr.cs | |
| parent | 211f7f69db4d84b82caa3ee62d4ecdfbbd95604d (diff) | |
Some small sync primitive fixes, logging fixes, started to implement the 2D engine on the GPU, fixed DrawArrays, implemented a few more shader instructions, made a start on nvdrv refactor, etc...
Diffstat (limited to 'Ryujinx.Graphics/Gpu/NsGpuMemoryMgr.cs')
| -rw-r--r-- | Ryujinx.Graphics/Gpu/NsGpuMemoryMgr.cs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Ryujinx.Graphics/Gpu/NsGpuMemoryMgr.cs b/Ryujinx.Graphics/Gpu/NsGpuMemoryMgr.cs index 7f50640d..eff51783 100644 --- a/Ryujinx.Graphics/Gpu/NsGpuMemoryMgr.cs +++ b/Ryujinx.Graphics/Gpu/NsGpuMemoryMgr.cs @@ -1,6 +1,6 @@ namespace Ryujinx.Graphics.Gpu { - class NsGpuMemoryMgr + public class NsGpuMemoryMgr { private const long AddrSize = 1L << 40; @@ -50,12 +50,20 @@ namespace Ryujinx.Graphics.Gpu return GpuAddr; } + public void Unmap(long Position, long Size) + { + for (long Offset = 0; Offset < Size; Offset += PageSize) + { + SetPTAddr(Position + Offset, PteUnmapped); + } + } + public long Map(long CpuAddr, long Size) { CpuAddr &= ~PageMask; long Position = GetFreePosition(Size); - + if (Position != -1) { for (long Offset = 0; Offset < Size; Offset += PageSize) |
