From 2437ccca0e82b8b2a99d8632acf28ca0cc14c523 Mon Sep 17 00:00:00 2001 From: gdk Date: Thu, 21 Nov 2019 23:46:14 -0300 Subject: Separate sub-channel state --- Ryujinx.Graphics.Gpu/Engine/MethodReport.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 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 dd022eb2..f73c03cb 100644 --- a/Ryujinx.Graphics.Gpu/Engine/MethodReport.cs +++ b/Ryujinx.Graphics.Gpu/Engine/MethodReport.cs @@ -10,7 +10,7 @@ namespace Ryujinx.Graphics.Gpu.Engine { private ulong _runningCounter; - private void Report(int argument) + private void Report(GpuState state, int argument) { ReportMode mode = (ReportMode)(argument & 3); @@ -18,16 +18,16 @@ namespace Ryujinx.Graphics.Gpu.Engine switch (mode) { - case ReportMode.Semaphore: ReportSemaphore(); break; - case ReportMode.Counter: ReportCounter(type); break; + case ReportMode.Semaphore: ReportSemaphore(state); break; + case ReportMode.Counter: ReportCounter(state, type); break; } } - private void ReportSemaphore() + private void ReportSemaphore(GpuState state) { - var state = _context.State.Get(MethodOffset.ReportState); + var rs = state.Get(MethodOffset.ReportState); - _context.MemoryAccessor.Write(state.Address.Pack(), state.Payload); + _context.MemoryAccessor.Write(rs.Address.Pack(), rs.Payload); _context.AdvanceSequence(); } @@ -38,7 +38,7 @@ namespace Ryujinx.Graphics.Gpu.Engine public ulong Timestamp; } - private void ReportCounter(ReportCounterType type) + private void ReportCounter(GpuState state, ReportCounterType type) { CounterData counterData = new CounterData(); @@ -78,9 +78,9 @@ namespace Ryujinx.Graphics.Gpu.Engine Span data = MemoryMarshal.Cast(counterDataSpan); - var state = _context.State.Get(MethodOffset.ReportState); + var rs = state.Get(MethodOffset.ReportState); - _context.MemoryAccessor.Write(state.Address.Pack(), data); + _context.MemoryAccessor.Write(rs.Address.Pack(), data); } private static ulong ConvertNanosecondsToTicks(ulong nanoseconds) -- cgit v1.2.3