From 7fea26e97e74e7ec0a5fa27921aa40c31b2c1dd9 Mon Sep 17 00:00:00 2001 From: gdkchan Date: Sat, 21 Jan 2023 21:07:43 -0300 Subject: Remove use of reflection on GAL multithreading (#4287) * Introduce new IGALCommand interface and use it * Remove use of reflection on GAL multithreading * Unmanaged constraint --- Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/ActionCommand.cs | 2 +- .../Multithreading/Commands/Renderer/CreateBufferCommand.cs | 2 +- .../Multithreading/Commands/Renderer/CreateProgramCommand.cs | 2 +- .../Multithreading/Commands/Renderer/CreateSamplerCommand.cs | 2 +- .../Multithreading/Commands/Renderer/CreateSyncCommand.cs | 2 +- .../Multithreading/Commands/Renderer/CreateTextureCommand.cs | 2 +- .../Multithreading/Commands/Renderer/GetCapabilitiesCommand.cs | 2 +- .../Multithreading/Commands/Renderer/PreFrameCommand.cs | 2 +- .../Multithreading/Commands/Renderer/ReportCounterCommand.cs | 2 +- .../Multithreading/Commands/Renderer/ResetCounterCommand.cs | 2 +- .../Multithreading/Commands/Renderer/UpdateCountersCommand.cs | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) (limited to 'Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer') diff --git a/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/ActionCommand.cs b/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/ActionCommand.cs index 07e55c96..41987da1 100644 --- a/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/ActionCommand.cs +++ b/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/ActionCommand.cs @@ -3,7 +3,7 @@ using System; namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Renderer { - struct ActionCommand : IGALCommand + struct ActionCommand : IGALCommand, IGALCommand { public CommandType CommandType => CommandType.Action; private TableRef _action; diff --git a/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/CreateBufferCommand.cs b/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/CreateBufferCommand.cs index a96b3cef..4f01dea2 100644 --- a/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/CreateBufferCommand.cs +++ b/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/CreateBufferCommand.cs @@ -1,6 +1,6 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Renderer { - struct CreateBufferCommand : IGALCommand + struct CreateBufferCommand : IGALCommand, IGALCommand { public CommandType CommandType => CommandType.CreateBuffer; private BufferHandle _threadedHandle; diff --git a/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/CreateProgramCommand.cs b/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/CreateProgramCommand.cs index e24505e5..19563e12 100644 --- a/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/CreateProgramCommand.cs +++ b/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/CreateProgramCommand.cs @@ -3,7 +3,7 @@ using Ryujinx.Graphics.GAL.Multithreading.Resources.Programs; namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Renderer { - struct CreateProgramCommand : IGALCommand + struct CreateProgramCommand : IGALCommand, IGALCommand { public CommandType CommandType => CommandType.CreateProgram; private TableRef _request; diff --git a/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/CreateSamplerCommand.cs b/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/CreateSamplerCommand.cs index bca98cfb..6ab862d4 100644 --- a/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/CreateSamplerCommand.cs +++ b/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/CreateSamplerCommand.cs @@ -3,7 +3,7 @@ using Ryujinx.Graphics.GAL.Multithreading.Resources; namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Renderer { - struct CreateSamplerCommand : IGALCommand + struct CreateSamplerCommand : IGALCommand, IGALCommand { public CommandType CommandType => CommandType.CreateSampler; private TableRef _sampler; diff --git a/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/CreateSyncCommand.cs b/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/CreateSyncCommand.cs index 66f5cf06..32afb051 100644 --- a/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/CreateSyncCommand.cs +++ b/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/CreateSyncCommand.cs @@ -1,6 +1,6 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Renderer { - struct CreateSyncCommand : IGALCommand + struct CreateSyncCommand : IGALCommand, IGALCommand { public CommandType CommandType => CommandType.CreateSync; private ulong _id; diff --git a/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/CreateTextureCommand.cs b/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/CreateTextureCommand.cs index f9240125..0347ded4 100644 --- a/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/CreateTextureCommand.cs +++ b/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/CreateTextureCommand.cs @@ -3,7 +3,7 @@ using Ryujinx.Graphics.GAL.Multithreading.Resources; namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Renderer { - struct CreateTextureCommand : IGALCommand + struct CreateTextureCommand : IGALCommand, IGALCommand { public CommandType CommandType => CommandType.CreateTexture; private TableRef _texture; diff --git a/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/GetCapabilitiesCommand.cs b/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/GetCapabilitiesCommand.cs index 102ed9da..4111dcfd 100644 --- a/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/GetCapabilitiesCommand.cs +++ b/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/GetCapabilitiesCommand.cs @@ -2,7 +2,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Renderer { - struct GetCapabilitiesCommand : IGALCommand + struct GetCapabilitiesCommand : IGALCommand, IGALCommand { public CommandType CommandType => CommandType.GetCapabilities; private TableRef> _result; diff --git a/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/PreFrameCommand.cs b/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/PreFrameCommand.cs index 1048dc9e..820908f3 100644 --- a/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/PreFrameCommand.cs +++ b/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/PreFrameCommand.cs @@ -1,6 +1,6 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Renderer { - struct PreFrameCommand : IGALCommand + struct PreFrameCommand : IGALCommand, IGALCommand { public CommandType CommandType => CommandType.PreFrame; diff --git a/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/ReportCounterCommand.cs b/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/ReportCounterCommand.cs index d477f235..4b0210cb 100644 --- a/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/ReportCounterCommand.cs +++ b/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/ReportCounterCommand.cs @@ -4,7 +4,7 @@ using System; namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Renderer { - struct ReportCounterCommand : IGALCommand + struct ReportCounterCommand : IGALCommand, IGALCommand { public CommandType CommandType => CommandType.ReportCounter; private TableRef _event; diff --git a/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/ResetCounterCommand.cs b/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/ResetCounterCommand.cs index 2835bf31..3d796041 100644 --- a/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/ResetCounterCommand.cs +++ b/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/ResetCounterCommand.cs @@ -1,6 +1,6 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Renderer { - struct ResetCounterCommand : IGALCommand + struct ResetCounterCommand : IGALCommand, IGALCommand { public CommandType CommandType => CommandType.ResetCounter; private CounterType _type; diff --git a/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/UpdateCountersCommand.cs b/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/UpdateCountersCommand.cs index f28bf080..c7076c0e 100644 --- a/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/UpdateCountersCommand.cs +++ b/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/UpdateCountersCommand.cs @@ -1,6 +1,6 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Renderer { - struct UpdateCountersCommand : IGALCommand + struct UpdateCountersCommand : IGALCommand, IGALCommand { public CommandType CommandType => CommandType.UpdateCounters; -- cgit v1.2.3