From 0954e76a261235107b2255c33de595d188570274 Mon Sep 17 00:00:00 2001 From: gdkchan Date: Sat, 3 Oct 2020 02:43:33 -0300 Subject: Improve BRX target detection heuristics (#1591) --- Ryujinx.Graphics.Gpu/Memory/MemoryManager.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) (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 ace94442..59b6d1e5 100644 --- a/Ryujinx.Graphics.Gpu/Memory/MemoryManager.cs +++ b/Ryujinx.Graphics.Gpu/Memory/MemoryManager.cs @@ -310,6 +310,16 @@ namespace Ryujinx.Graphics.Gpu.Memory return PteUnmapped; } + /// + /// Checks if a given page is mapped. + /// + /// GPU virtual address of the page to check + /// True if the page is mapped, false otherwise + public bool IsMapped(ulong gpuVa) + { + return Translate(gpuVa) != PteUnmapped; + } + /// /// Translates a GPU virtual address to a CPU virtual address. /// -- cgit v1.2.3