diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2020-05-05 22:02:28 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-06 11:02:28 +1000 |
| commit | b8eb6abeccbd4a468214a4d2ad3a9b6e5e06973c (patch) | |
| tree | cd3d71ebde0f4f32eb674778adae89c0efcb75df /Ryujinx.Graphics.Gpu/Memory/MemoryManager.cs | |
| parent | 7f500e7cae940958289abe1a3461e52684742053 (diff) | |
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
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Memory/MemoryManager.cs')
| -rw-r--r-- | Ryujinx.Graphics.Gpu/Memory/MemoryManager.cs | 41 |
1 files changed, 0 insertions, 41 deletions
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 @@ -241,28 +241,6 @@ namespace Ryujinx.Graphics.Gpu.Memory } /// <summary> - /// Gets the number of mapped or reserved pages on a given region. - /// </summary> - /// <param name="gpuVa">Start GPU virtual address of the region</param> - /// <param name="maxSize">Maximum size of the data</param> - /// <returns>Mapped size in bytes of the specified region</returns> - internal ulong GetSubSize(ulong gpuVa, ulong maxSize) - { - ulong size = 0; - - while (GetPte(gpuVa + size) != PteUnmapped) - { - size += PageSize; - if (size >= maxSize) - { - return maxSize; - } - } - - return size; - } - - /// <summary> /// Translates a GPU virtual address to a CPU virtual address. /// </summary> /// <param name="gpuVa">GPU virtual address to be translated</param> @@ -280,25 +258,6 @@ namespace Ryujinx.Graphics.Gpu.Memory } /// <summary> - /// Checks if a given memory region is currently unmapped. - /// </summary> - /// <param name="gpuVa">Start GPU virtual address of the region</param> - /// <param name="size">Size in bytes of the region</param> - /// <returns>True if the region is unmapped (free), false otherwise</returns> - public bool IsRegionFree(ulong gpuVa, ulong size) - { - for (ulong offset = 0; offset < size; offset += PageSize) - { - if (IsPageInUse(gpuVa + offset)) - { - return false; - } - } - - return true; - } - - /// <summary> /// Checks if a given memory page is mapped or reserved. /// </summary> /// <param name="gpuVa">GPU virtual address of the page</param> |
