From 40b21cc3c4d2622bbd4f88d43073341854d9a671 Mon Sep 17 00:00:00 2001 From: gdkchan Date: Sun, 11 Jul 2021 17:20:40 -0300 Subject: Separate GPU engines (part 2/2) (#2440) * 3D engine now uses DeviceState too, plus new state modification tracking * Remove old methods code * Remove GpuState and friends * Optimize DeviceState, force inline some functions * This change was not supposed to go in * Proper channel initialization * Optimize state read/write methods even more * Fix debug build * Do not dirty state if the write is redundant * The YControl register should dirty either the viewport or front face state too, to update the host origin * Avoid redundant vertex buffer updates * Move state and get rid of the Ryujinx.Graphics.Gpu.State namespace * Comments and nits * Fix rebase * PR feedback * Move changed = false to improve codegen * PR feedback * Carry RyuJIT a bit more --- .../Engine/InlineToMemory/InlineToMemoryClass.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Ryujinx.Graphics.Gpu/Engine/InlineToMemory/InlineToMemoryClass.cs') diff --git a/Ryujinx.Graphics.Gpu/Engine/InlineToMemory/InlineToMemoryClass.cs b/Ryujinx.Graphics.Gpu/Engine/InlineToMemory/InlineToMemoryClass.cs index 0e7d6fb0..cb4133ec 100644 --- a/Ryujinx.Graphics.Gpu/Engine/InlineToMemory/InlineToMemoryClass.cs +++ b/Ryujinx.Graphics.Gpu/Engine/InlineToMemory/InlineToMemoryClass.cs @@ -41,7 +41,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.InlineToMemory /// GPU context /// GPU channel /// Indicates if the internal state should be initialized. Set to false if part of another engine - protected InlineToMemoryClass(GpuContext context, GpuChannel channel, bool initializeState) + public InlineToMemoryClass(GpuContext context, GpuChannel channel, bool initializeState) { _context = context; _channel = channel; @@ -70,20 +70,20 @@ namespace Ryujinx.Graphics.Gpu.Engine.InlineToMemory /// /// Register byte offset /// Data at the specified offset - public virtual int Read(int offset) => _state.Read(offset); + public int Read(int offset) => _state.Read(offset); /// /// Writes data to the class registers. /// /// Register byte offset /// Data to be written - public virtual void Write(int offset, int data) => _state.Write(offset, data); + public void Write(int offset, int data) => _state.Write(offset, data); /// /// Launches Inline-to-Memory engine DMA copy. /// /// Method call argument - protected virtual void LaunchDma(int argument) + private void LaunchDma(int argument) { LaunchDma(ref _state.State, argument); } @@ -93,7 +93,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.InlineToMemory /// /// Current class state /// Method call argument - protected void LaunchDma(ref InlineToMemoryClassState state, int argument) + public void LaunchDma(ref InlineToMemoryClassState state, int argument) { _isLinear = (argument & 1) != 0; @@ -131,7 +131,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.InlineToMemory /// Pushes a word of data to the Inline-to-Memory engine. /// /// Method call argument - protected void LoadInlineData(int argument) + public void LoadInlineData(int argument) { if (!_finished) { -- cgit v1.2.3