diff options
| author | gdk <gab.dark.100@gmail.com> | 2019-11-21 23:46:14 -0300 |
|---|---|---|
| committer | Thog <thog@protonmail.com> | 2020-01-09 02:13:00 +0100 |
| commit | 2437ccca0e82b8b2a99d8632acf28ca0cc14c523 (patch) | |
| tree | fff04c08f5812b602378f352650144736983497a /Ryujinx.Graphics.Gpu/Engine/MethodReport.cs | |
| parent | 3ca675223a495f7d0a9d2130b8d88d9c5c79747e (diff) | |
Separate sub-channel state
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Engine/MethodReport.cs')
| -rw-r--r-- | Ryujinx.Graphics.Gpu/Engine/MethodReport.cs | 18 |
1 files changed, 9 insertions, 9 deletions
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<ReportState>(MethodOffset.ReportState); + var rs = state.Get<ReportState>(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<byte> data = MemoryMarshal.Cast<CounterData, byte>(counterDataSpan); - var state = _context.State.Get<ReportState>(MethodOffset.ReportState); + var rs = state.Get<ReportState>(MethodOffset.ReportState); - _context.MemoryAccessor.Write(state.Address.Pack(), data); + _context.MemoryAccessor.Write(rs.Address.Pack(), data); } private static ulong ConvertNanosecondsToTicks(ulong nanoseconds) |
