From 5099b77c0fcb1181ce8078b7e2fc418e5aef034d Mon Sep 17 00:00:00 2001 From: gdk Date: Tue, 22 Mar 2022 15:39:33 -0300 Subject: [PATCH] Remove unused code --- Ryujinx.Graphics.Gpu/Memory/MemoryManager.cs | 59 -------------------- 1 file changed, 59 deletions(-) diff --git a/Ryujinx.Graphics.Gpu/Memory/MemoryManager.cs b/Ryujinx.Graphics.Gpu/Memory/MemoryManager.cs index c9a2228e9..ae27c7129 100644 --- a/Ryujinx.Graphics.Gpu/Memory/MemoryManager.cs +++ b/Ryujinx.Graphics.Gpu/Memory/MemoryManager.cs @@ -115,65 +115,6 @@ namespace Ryujinx.Graphics.Gpu.Memory } } - public ReadOnlySpan GetSpanMapped(ulong va, int size, bool tracked = false) - { - bool isContiguous = true; - int mappedSize = 0; - - if (ValidateAddress(va) && GetPte(va) != PteUnmapped && Physical.IsMapped(Translate(va))) - { - ulong endVa = va + (ulong)size; - ulong endVaAligned = (endVa + PageMask) & ~PageMask; - ulong currentVa = va & ~PageMask; - - int pages = (int)((endVaAligned - currentVa) / PageSize); - - for (int page = 0; page < pages - 1; page++) - { - ulong nextVa = currentVa + PageSize; - ulong nextPa = Translate(nextVa); - - if (!ValidateAddress(nextVa) || GetPte(nextVa) == PteUnmapped || !Physical.IsMapped(nextPa)) - { - break; - } - - if (Translate(currentVa) + PageSize != nextPa) - { - isContiguous = false; - } - - currentVa += PageSize; - } - - currentVa += PageSize; - - if (currentVa > endVa) - { - currentVa = endVa; - } - - mappedSize = (int)(currentVa - va); - } - else - { - return ReadOnlySpan.Empty; - } - - if (isContiguous) - { - return Physical.GetSpan(Translate(va), mappedSize, tracked); - } - else - { - Span data = new byte[mappedSize]; - - ReadImpl(va, data, tracked); - - return data; - } - } - /// /// Reads data from a possibly non-contiguous region of GPU mapped memory. ///