From fbb4019ed5c12c4a888c7b09db648ac595366896 Mon Sep 17 00:00:00 2001 From: gdkchan Date: Tue, 29 Jun 2021 14:32:02 -0300 Subject: Initial support for separate GPU address spaces (#2394) * Make GPU memory manager a member of GPU channel * Move physical memory instance to the memory manager, and the caches to the physical memory * PR feedback --- Ryujinx.Graphics.Gpu/Engine/MethodReport.cs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'Ryujinx.Graphics.Gpu/Engine/MethodReport.cs') diff --git a/Ryujinx.Graphics.Gpu/Engine/MethodReport.cs b/Ryujinx.Graphics.Gpu/Engine/MethodReport.cs index 8320ba65..2dd0bbfa 100644 --- a/Ryujinx.Graphics.Gpu/Engine/MethodReport.cs +++ b/Ryujinx.Graphics.Gpu/Engine/MethodReport.cs @@ -12,8 +12,6 @@ namespace Ryujinx.Graphics.Gpu.Engine private const int NsToTicksFractionNumerator = 384; private const int NsToTicksFractionDenominator = 625; - private readonly CounterCache _counterCache = new CounterCache(); - /// /// Writes a GPU counter to guest memory. /// @@ -39,7 +37,7 @@ namespace Ryujinx.Graphics.Gpu.Engine { var rs = state.Get(MethodOffset.ReportState); - _context.MemoryManager.Write(rs.Address.Pack(), rs.Payload); + state.Channel.MemoryManager.Write(rs.Address.Pack(), rs.Payload); _context.AdvanceSequence(); } @@ -85,7 +83,7 @@ namespace Ryujinx.Graphics.Gpu.Engine if (counter?.Invalid != true) { - _context.MemoryManager.Write(gpuVa, counterData); + state.Channel.MemoryManager.Write(gpuVa, counterData); } }; @@ -105,7 +103,7 @@ namespace Ryujinx.Graphics.Gpu.Engine break; } - _counterCache.AddOrUpdate(gpuVa, counter); + state.Channel.MemoryManager.CounterCache.AddOrUpdate(gpuVa, counter); } /// -- cgit v1.2.3