From c6f1908e0f07b6dd4b60cbe333a9b5f1adec276b Mon Sep 17 00:00:00 2001 From: Isaac Marovitz <42140194+IsaacMarovitz@users.noreply.github.com> Date: Sat, 10 Dec 2022 16:12:51 -0500 Subject: [PATCH] Fix Lambda Explicit Type Specification Warning (#4090) --- ARMeilleure/Decoders/OpCodeTable.cs | 2 +- Ryujinx.Ava/Program.cs | 4 +- .../Multithreading/CommandHelper.cs | 174 +++++++++--------- .../Multithreading/ThreadedRenderer.cs | 2 +- 4 files changed, 91 insertions(+), 91 deletions(-) diff --git a/ARMeilleure/Decoders/OpCodeTable.cs b/ARMeilleure/Decoders/OpCodeTable.cs index caa93099e..3f24986c5 100644 --- a/ARMeilleure/Decoders/OpCodeTable.cs +++ b/ARMeilleure/Decoders/OpCodeTable.cs @@ -1341,7 +1341,7 @@ namespace ARMeilleure.Decoders { string reversedEncoding = encoding.Substring(16) + encoding.Substring(0, 16); MakeOp reversedMakeOp = - (InstDescriptor inst, ulong address, int opCode) + (inst, address, opCode) => makeOp(inst, address, (int)BitOperations.RotateRight((uint)opCode, 16)); Set(reversedEncoding, AllInstT32, new InstDescriptor(name, emitter), reversedMakeOp); } diff --git a/Ryujinx.Ava/Program.cs b/Ryujinx.Ava/Program.cs index d929331db..ba10a4599 100644 --- a/Ryujinx.Ava/Program.cs +++ b/Ryujinx.Ava/Program.cs @@ -82,8 +82,8 @@ namespace Ryujinx.Ava Console.Title = $"Ryujinx Console {Version}"; // Hook unhandled exception and process exit events. - AppDomain.CurrentDomain.UnhandledException += (object sender, UnhandledExceptionEventArgs e) => ProcessUnhandledException(e.ExceptionObject as Exception, e.IsTerminating); - AppDomain.CurrentDomain.ProcessExit += (object sender, EventArgs e) => Exit(); + AppDomain.CurrentDomain.UnhandledException += (sender, e) => ProcessUnhandledException(e.ExceptionObject as Exception, e.IsTerminating); + AppDomain.CurrentDomain.ProcessExit += (sender, e) => Exit(); // Setup base data directory. AppDataManager.Initialize(CommandLineState.BaseDirPathArg); diff --git a/Ryujinx.Graphics.GAL/Multithreading/CommandHelper.cs b/Ryujinx.Graphics.GAL/Multithreading/CommandHelper.cs index b2799e099..497693296 100644 --- a/Ryujinx.Graphics.GAL/Multithreading/CommandHelper.cs +++ b/Ryujinx.Graphics.GAL/Multithreading/CommandHelper.cs @@ -50,186 +50,186 @@ namespace Ryujinx.Graphics.GAL.Multithreading private static void InitLookup() { - _lookup[(int)CommandType.Action] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.Action] = (memory, threaded, renderer) => ActionCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.CreateBuffer] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.CreateBuffer] = (memory, threaded, renderer) => CreateBufferCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.CreateProgram] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.CreateProgram] = (memory, threaded, renderer) => CreateProgramCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.CreateSampler] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.CreateSampler] = (memory, threaded, renderer) => CreateSamplerCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.CreateSync] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.CreateSync] = (memory, threaded, renderer) => CreateSyncCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.CreateTexture] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.CreateTexture] = (memory, threaded, renderer) => CreateTextureCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.GetCapabilities] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.GetCapabilities] = (memory, threaded, renderer) => GetCapabilitiesCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.PreFrame] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.PreFrame] = (memory, threaded, renderer) => PreFrameCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.ReportCounter] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.ReportCounter] = (memory, threaded, renderer) => ReportCounterCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.ResetCounter] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.ResetCounter] = (memory, threaded, renderer) => ResetCounterCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.UpdateCounters] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.UpdateCounters] = (memory, threaded, renderer) => UpdateCountersCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.BufferDispose] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.BufferDispose] = (memory, threaded, renderer) => BufferDisposeCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.BufferGetData] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.BufferGetData] = (memory, threaded, renderer) => BufferGetDataCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.BufferSetData] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.BufferSetData] = (memory, threaded, renderer) => BufferSetDataCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.CounterEventDispose] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.CounterEventDispose] = (memory, threaded, renderer) => CounterEventDisposeCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.CounterEventFlush] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.CounterEventFlush] = (memory, threaded, renderer) => CounterEventFlushCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.ProgramDispose] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.ProgramDispose] = (memory, threaded, renderer) => ProgramDisposeCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.ProgramGetBinary] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.ProgramGetBinary] = (memory, threaded, renderer) => ProgramGetBinaryCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.ProgramCheckLink] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.ProgramCheckLink] = (memory, threaded, renderer) => ProgramCheckLinkCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.SamplerDispose] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.SamplerDispose] = (memory, threaded, renderer) => SamplerDisposeCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.TextureCopyTo] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.TextureCopyTo] = (memory, threaded, renderer) => TextureCopyToCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.TextureCopyToScaled] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.TextureCopyToScaled] = (memory, threaded, renderer) => TextureCopyToScaledCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.TextureCopyToSlice] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.TextureCopyToSlice] = (memory, threaded, renderer) => TextureCopyToSliceCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.TextureCreateView] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.TextureCreateView] = (memory, threaded, renderer) => TextureCreateViewCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.TextureGetData] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.TextureGetData] = (memory, threaded, renderer) => TextureGetDataCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.TextureGetDataSlice] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.TextureGetDataSlice] = (memory, threaded, renderer) => TextureGetDataSliceCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.TextureRelease] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.TextureRelease] = (memory, threaded, renderer) => TextureReleaseCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.TextureSetData] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.TextureSetData] = (memory, threaded, renderer) => TextureSetDataCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.TextureSetDataSlice] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.TextureSetDataSlice] = (memory, threaded, renderer) => TextureSetDataSliceCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.TextureSetDataSliceRegion] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.TextureSetDataSliceRegion] = (memory, threaded, renderer) => TextureSetDataSliceRegionCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.TextureSetStorage] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.TextureSetStorage] = (memory, threaded, renderer) => TextureSetStorageCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.WindowPresent] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.WindowPresent] = (memory, threaded, renderer) => WindowPresentCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.Barrier] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.Barrier] = (memory, threaded, renderer) => BarrierCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.BeginTransformFeedback] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.BeginTransformFeedback] = (memory, threaded, renderer) => BeginTransformFeedbackCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.ClearBuffer] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.ClearBuffer] = (memory, threaded, renderer) => ClearBufferCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.ClearRenderTargetColor] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.ClearRenderTargetColor] = (memory, threaded, renderer) => ClearRenderTargetColorCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.ClearRenderTargetDepthStencil] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.ClearRenderTargetDepthStencil] = (memory, threaded, renderer) => ClearRenderTargetDepthStencilCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.CommandBufferBarrier] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.CommandBufferBarrier] = (memory, threaded, renderer) => CommandBufferBarrierCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.CopyBuffer] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.CopyBuffer] = (memory, threaded, renderer) => CopyBufferCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.DispatchCompute] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.DispatchCompute] = (memory, threaded, renderer) => DispatchComputeCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.Draw] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.Draw] = (memory, threaded, renderer) => DrawCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.DrawIndexed] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.DrawIndexed] = (memory, threaded, renderer) => DrawIndexedCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.DrawIndexedIndirect] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.DrawIndexedIndirect] = (memory, threaded, renderer) => DrawIndexedIndirectCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.DrawIndexedIndirectCount] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.DrawIndexedIndirectCount] = (memory, threaded, renderer) => DrawIndexedIndirectCountCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.DrawIndirect] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.DrawIndirect] = (memory, threaded, renderer) => DrawIndirectCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.DrawIndirectCount] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.DrawIndirectCount] = (memory, threaded, renderer) => DrawIndirectCountCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.DrawTexture] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.DrawTexture] = (memory, threaded, renderer) => DrawTextureCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.EndHostConditionalRendering] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.EndHostConditionalRendering] = (memory, threaded, renderer) => EndHostConditionalRenderingCommand.Run(renderer); - _lookup[(int)CommandType.EndTransformFeedback] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.EndTransformFeedback] = (memory, threaded, renderer) => EndTransformFeedbackCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.SetAlphaTest] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.SetAlphaTest] = (memory, threaded, renderer) => SetAlphaTestCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.SetBlendState] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.SetBlendState] = (memory, threaded, renderer) => SetBlendStateCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.SetDepthBias] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.SetDepthBias] = (memory, threaded, renderer) => SetDepthBiasCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.SetDepthClamp] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.SetDepthClamp] = (memory, threaded, renderer) => SetDepthClampCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.SetDepthMode] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.SetDepthMode] = (memory, threaded, renderer) => SetDepthModeCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.SetDepthTest] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.SetDepthTest] = (memory, threaded, renderer) => SetDepthTestCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.SetFaceCulling] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.SetFaceCulling] = (memory, threaded, renderer) => SetFaceCullingCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.SetFrontFace] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.SetFrontFace] = (memory, threaded, renderer) => SetFrontFaceCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.SetStorageBuffers] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.SetStorageBuffers] = (memory, threaded, renderer) => SetStorageBuffersCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.SetTransformFeedbackBuffers] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.SetTransformFeedbackBuffers] = (memory, threaded, renderer) => SetTransformFeedbackBuffersCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.SetUniformBuffers] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.SetUniformBuffers] = (memory, threaded, renderer) => SetUniformBuffersCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.SetImage] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.SetImage] = (memory, threaded, renderer) => SetImageCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.SetIndexBuffer] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.SetIndexBuffer] = (memory, threaded, renderer) => SetIndexBufferCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.SetLineParameters] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.SetLineParameters] = (memory, threaded, renderer) => SetLineParametersCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.SetLogicOpState] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.SetLogicOpState] = (memory, threaded, renderer) => SetLogicOpStateCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.SetMultisampleState] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.SetMultisampleState] = (memory, threaded, renderer) => SetMultisampleStateCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.SetPatchParameters] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.SetPatchParameters] = (memory, threaded, renderer) => SetPatchParametersCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.SetPointParameters] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.SetPointParameters] = (memory, threaded, renderer) => SetPointParametersCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.SetPolygonMode] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.SetPolygonMode] = (memory, threaded, renderer) => SetPolygonModeCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.SetPrimitiveRestart] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.SetPrimitiveRestart] = (memory, threaded, renderer) => SetPrimitiveRestartCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.SetPrimitiveTopology] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.SetPrimitiveTopology] = (memory, threaded, renderer) => SetPrimitiveTopologyCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.SetProgram] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.SetProgram] = (memory, threaded, renderer) => SetProgramCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.SetRasterizerDiscard] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.SetRasterizerDiscard] = (memory, threaded, renderer) => SetRasterizerDiscardCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.SetRenderTargetColorMasks] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.SetRenderTargetColorMasks] = (memory, threaded, renderer) => SetRenderTargetColorMasksCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.SetRenderTargetScale] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.SetRenderTargetScale] = (memory, threaded, renderer) => SetRenderTargetScaleCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.SetRenderTargets] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.SetRenderTargets] = (memory, threaded, renderer) => SetRenderTargetsCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.SetScissor] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.SetScissor] = (memory, threaded, renderer) => SetScissorsCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.SetStencilTest] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.SetStencilTest] = (memory, threaded, renderer) => SetStencilTestCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.SetTextureAndSampler] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.SetTextureAndSampler] = (memory, threaded, renderer) => SetTextureAndSamplerCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.SetUserClipDistance] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.SetUserClipDistance] = (memory, threaded, renderer) => SetUserClipDistanceCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.SetVertexAttribs] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.SetVertexAttribs] = (memory, threaded, renderer) => SetVertexAttribsCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.SetVertexBuffers] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.SetVertexBuffers] = (memory, threaded, renderer) => SetVertexBuffersCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.SetViewports] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.SetViewports] = (memory, threaded, renderer) => SetViewportsCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.TextureBarrier] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.TextureBarrier] = (memory, threaded, renderer) => TextureBarrierCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.TextureBarrierTiled] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.TextureBarrierTiled] = (memory, threaded, renderer) => TextureBarrierTiledCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.TryHostConditionalRendering] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.TryHostConditionalRendering] = (memory, threaded, renderer) => TryHostConditionalRenderingCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.TryHostConditionalRenderingFlush] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.TryHostConditionalRenderingFlush] = (memory, threaded, renderer) => TryHostConditionalRenderingFlushCommand.Run(ref GetCommand(memory), threaded, renderer); - _lookup[(int)CommandType.UpdateRenderScale] = (Span memory, ThreadedRenderer threaded, IRenderer renderer) => + _lookup[(int)CommandType.UpdateRenderScale] = (memory, threaded, renderer) => UpdateRenderScaleCommand.Run(ref GetCommand(memory), threaded, renderer); } diff --git a/Ryujinx.Graphics.GAL/Multithreading/ThreadedRenderer.cs b/Ryujinx.Graphics.GAL/Multithreading/ThreadedRenderer.cs index a9e3b75c4..62a7dae79 100644 --- a/Ryujinx.Graphics.GAL/Multithreading/ThreadedRenderer.cs +++ b/Ryujinx.Graphics.GAL/Multithreading/ThreadedRenderer.cs @@ -72,7 +72,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading { _baseRenderer = renderer; - renderer.ScreenCaptured += (object sender, ScreenCaptureImageInfo info) => ScreenCaptured?.Invoke(this, info); + renderer.ScreenCaptured += (sender, info) => ScreenCaptured?.Invoke(this, info); Pipeline = new ThreadedPipeline(this, renderer.Pipeline); Window = new ThreadedWindow(this, renderer);