From b8eb6abeccbd4a468214a4d2ad3a9b6e5e06973c Mon Sep 17 00:00:00 2001 From: gdkchan Date: Tue, 5 May 2020 22:02:28 -0300 Subject: Refactor shader GPU state and memory access (#1203) * Refactor shader GPU state and memory access * Fix NVDEC project build * Address PR feedback and add missing XML comments --- Ryujinx.Graphics.Gpu/Memory/MemoryManager.cs | 41 ---------------------------- 1 file changed, 41 deletions(-) (limited to 'Ryujinx.Graphics.Gpu/Memory/MemoryManager.cs') diff --git a/Ryujinx.Graphics.Gpu/Memory/MemoryManager.cs b/Ryujinx.Graphics.Gpu/Memory/MemoryManager.cs index 6f9ee6a4..a9a8fbac 100644 --- a/Ryujinx.Graphics.Gpu/Memory/MemoryManager.cs +++ b/Ryujinx.Graphics.Gpu/Memory/MemoryManager.cs @@ -240,28 +240,6 @@ namespace Ryujinx.Graphics.Gpu.Memory return PteUnmapped; } - /// - /// Gets the number of mapped or reserved pages on a given region. - /// - /// Start GPU virtual address of the region - /// Maximum size of the data - /// Mapped size in bytes of the specified region - internal ulong GetSubSize(ulong gpuVa, ulong maxSize) - { - ulong size = 0; - - while (GetPte(gpuVa + size) != PteUnmapped) - { - size += PageSize; - if (size >= maxSize) - { - return maxSize; - } - } - - return size; - } - /// /// Translates a GPU virtual address to a CPU virtual address. /// @@ -279,25 +257,6 @@ namespace Ryujinx.Graphics.Gpu.Memory return baseAddress + (gpuVa & PageMask); } - /// - /// Checks if a given memory region is currently unmapped. - /// - /// Start GPU virtual address of the region - /// Size in bytes of the region - /// True if the region is unmapped (free), false otherwise - public bool IsRegionFree(ulong gpuVa, ulong size) - { - for (ulong offset = 0; offset < size; offset += PageSize) - { - if (IsPageInUse(gpuVa + offset)) - { - return false; - } - } - - return true; - } - /// /// Checks if a given memory page is mapped or reserved. /// -- cgit v1.2.3