From 29e8576b0d056a9c3a32b93bf47cafbb073e9f9c Mon Sep 17 00:00:00 2001 From: Thog Date: Sun, 12 Jan 2020 03:14:27 +0100 Subject: MapBufferEx: take page size into account (#873) Fix #744 --- Ryujinx.Graphics.Gpu/Memory/MemoryManager.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Ryujinx.Graphics.Gpu/Memory') diff --git a/Ryujinx.Graphics.Gpu/Memory/MemoryManager.cs b/Ryujinx.Graphics.Gpu/Memory/MemoryManager.cs index 2fc315c3..ffca6f33 100644 --- a/Ryujinx.Graphics.Gpu/Memory/MemoryManager.cs +++ b/Ryujinx.Graphics.Gpu/Memory/MemoryManager.cs @@ -66,12 +66,13 @@ namespace Ryujinx.Graphics.Gpu.Memory /// /// CPU virtual address to map into /// Size in bytes of the mapping + /// Required alignment of the GPU virtual address in bytes /// GPU virtual address where the range was mapped, or an all ones mask in case of failure - public ulong Map(ulong pa, ulong size) + public ulong MapAllocate(ulong pa, ulong size, ulong alignment) { lock (_pageTable) { - ulong va = GetFreePosition(size); + ulong va = GetFreePosition(size, alignment); if (va != PteUnmapped) { -- cgit v1.2.3