diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2020-10-03 02:43:33 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-03 15:43:33 +1000 |
| commit | 0954e76a261235107b2255c33de595d188570274 (patch) | |
| tree | 719e71e2938e808ca1164aa0da69f95d23248a88 /Ryujinx.Graphics.Gpu/Memory/MemoryManager.cs | |
| parent | 86412ed30a5e28a7c11ba30c3987bdebeeb903c1 (diff) | |
Improve BRX target detection heuristics (#1591)
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Memory/MemoryManager.cs')
| -rw-r--r-- | Ryujinx.Graphics.Gpu/Memory/MemoryManager.cs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Ryujinx.Graphics.Gpu/Memory/MemoryManager.cs b/Ryujinx.Graphics.Gpu/Memory/MemoryManager.cs index ace94442..59b6d1e5 100644 --- a/Ryujinx.Graphics.Gpu/Memory/MemoryManager.cs +++ b/Ryujinx.Graphics.Gpu/Memory/MemoryManager.cs @@ -311,6 +311,16 @@ namespace Ryujinx.Graphics.Gpu.Memory } /// <summary> + /// Checks if a given page is mapped. + /// </summary> + /// <param name="gpuVa">GPU virtual address of the page to check</param> + /// <returns>True if the page is mapped, false otherwise</returns> + public bool IsMapped(ulong gpuVa) + { + return Translate(gpuVa) != PteUnmapped; + } + + /// <summary> /// Translates a GPU virtual address to a CPU virtual address. /// </summary> /// <param name="gpuVa">GPU virtual address to be translated</param> |
