Remove use of reflection on GAL multithreading (#4287)

* Introduce new IGALCommand<T> interface and use it

* Remove use of reflection on GAL multithreading

* Unmanaged constraint
This commit is contained in:
gdkchan 2023-01-21 21:07:43 -03:00 committed by GitHub
parent 7b7f62c776
commit 7fea26e97e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
89 changed files with 192 additions and 281 deletions

View file

@ -1,6 +1,6 @@
namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct BarrierCommand : IGALCommand
struct BarrierCommand : IGALCommand, IGALCommand<BarrierCommand>
{
public CommandType CommandType => CommandType.Barrier;

View file

@ -1,6 +1,6 @@
namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct BeginTransformFeedbackCommand : IGALCommand
struct BeginTransformFeedbackCommand : IGALCommand, IGALCommand<BeginTransformFeedbackCommand>
{
public CommandType CommandType => CommandType.BeginTransformFeedback;
private PrimitiveTopology _topology;

View file

@ -1,6 +1,6 @@
namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Buffer
{
struct BufferDisposeCommand : IGALCommand
struct BufferDisposeCommand : IGALCommand, IGALCommand<BufferDisposeCommand>
{
public CommandType CommandType => CommandType.BufferDispose;
private BufferHandle _buffer;

View file

@ -3,7 +3,7 @@ using System;
namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Buffer
{
struct BufferGetDataCommand : IGALCommand
struct BufferGetDataCommand : IGALCommand, IGALCommand<BufferGetDataCommand>
{
public CommandType CommandType => CommandType.BufferGetData;
private BufferHandle _buffer;

View file

@ -3,7 +3,7 @@ using System;
namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Buffer
{
struct BufferSetDataCommand : IGALCommand
struct BufferSetDataCommand : IGALCommand, IGALCommand<BufferSetDataCommand>
{
public CommandType CommandType => CommandType.BufferSetData;
private BufferHandle _buffer;

View file

@ -1,6 +1,6 @@
namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct ClearBufferCommand : IGALCommand
struct ClearBufferCommand : IGALCommand, IGALCommand<ClearBufferCommand>
{
public CommandType CommandType => CommandType.ClearBuffer;
private BufferHandle _destination;

View file

@ -1,6 +1,6 @@
namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct ClearRenderTargetColorCommand : IGALCommand
struct ClearRenderTargetColorCommand : IGALCommand, IGALCommand<ClearRenderTargetColorCommand>
{
public CommandType CommandType => CommandType.ClearRenderTargetColor;
private int _index;

View file

@ -1,6 +1,6 @@
namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct ClearRenderTargetDepthStencilCommand : IGALCommand
struct ClearRenderTargetDepthStencilCommand : IGALCommand, IGALCommand<ClearRenderTargetDepthStencilCommand>
{
public CommandType CommandType => CommandType.ClearRenderTargetDepthStencil;
private int _layer;

View file

@ -1,6 +1,6 @@
namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct CommandBufferBarrierCommand : IGALCommand
struct CommandBufferBarrierCommand : IGALCommand, IGALCommand<CommandBufferBarrierCommand>
{
public CommandType CommandType => CommandType.CommandBufferBarrier;

View file

@ -1,6 +1,6 @@
namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct CopyBufferCommand : IGALCommand
struct CopyBufferCommand : IGALCommand, IGALCommand<CopyBufferCommand>
{
public CommandType CommandType => CommandType.CopyBuffer;
private BufferHandle _source;

View file

@ -3,7 +3,7 @@ using Ryujinx.Graphics.GAL.Multithreading.Resources;
namespace Ryujinx.Graphics.GAL.Multithreading.Commands.CounterEvent
{
struct CounterEventDisposeCommand : IGALCommand
struct CounterEventDisposeCommand : IGALCommand, IGALCommand<CounterEventDisposeCommand>
{
public CommandType CommandType => CommandType.CounterEventDispose;
private TableRef<ThreadedCounterEvent> _event;

View file

@ -3,7 +3,7 @@ using Ryujinx.Graphics.GAL.Multithreading.Resources;
namespace Ryujinx.Graphics.GAL.Multithreading.Commands.CounterEvent
{
struct CounterEventFlushCommand : IGALCommand
struct CounterEventFlushCommand : IGALCommand, IGALCommand<CounterEventFlushCommand>
{
public CommandType CommandType => CommandType.CounterEventFlush;
private TableRef<ThreadedCounterEvent> _event;

View file

@ -1,6 +1,6 @@
namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct DispatchComputeCommand : IGALCommand
struct DispatchComputeCommand : IGALCommand, IGALCommand<DispatchComputeCommand>
{
public CommandType CommandType => CommandType.DispatchCompute;
private int _groupsX;

View file

@ -1,6 +1,6 @@
namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct DrawIndexedCommand : IGALCommand
struct DrawIndexedCommand : IGALCommand, IGALCommand<DrawIndexedCommand>
{
public CommandType CommandType => CommandType.DrawIndexed;
private int _indexCount;

View file

@ -1,6 +1,6 @@
namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct DrawCommand : IGALCommand
struct DrawCommand : IGALCommand, IGALCommand<DrawCommand>
{
public CommandType CommandType => CommandType.Draw;
private int _vertexCount;

View file

@ -1,6 +1,6 @@
namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct DrawIndexedIndirectCommand : IGALCommand
struct DrawIndexedIndirectCommand : IGALCommand, IGALCommand<DrawIndexedIndirectCommand>
{
public CommandType CommandType => CommandType.DrawIndexedIndirect;
private BufferRange _indirectBuffer;

View file

@ -1,6 +1,6 @@
namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct DrawIndexedIndirectCountCommand : IGALCommand
struct DrawIndexedIndirectCountCommand : IGALCommand, IGALCommand<DrawIndexedIndirectCountCommand>
{
public CommandType CommandType => CommandType.DrawIndexedIndirectCount;
private BufferRange _indirectBuffer;

View file

@ -1,6 +1,6 @@
namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct DrawIndirectCommand : IGALCommand
struct DrawIndirectCommand : IGALCommand, IGALCommand<DrawIndirectCommand>
{
public CommandType CommandType => CommandType.DrawIndirect;
private BufferRange _indirectBuffer;

View file

@ -1,6 +1,6 @@
namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct DrawIndirectCountCommand : IGALCommand
struct DrawIndirectCountCommand : IGALCommand, IGALCommand<DrawIndirectCountCommand>
{
public CommandType CommandType => CommandType.DrawIndirectCount;
private BufferRange _indirectBuffer;

View file

@ -3,7 +3,7 @@ using Ryujinx.Graphics.GAL.Multithreading.Resources;
namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct DrawTextureCommand : IGALCommand
struct DrawTextureCommand : IGALCommand, IGALCommand<DrawTextureCommand>
{
public CommandType CommandType => CommandType.DrawTexture;
private TableRef<ITexture> _texture;

View file

@ -1,10 +1,10 @@
namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct EndHostConditionalRenderingCommand : IGALCommand
struct EndHostConditionalRenderingCommand : IGALCommand, IGALCommand<EndHostConditionalRenderingCommand>
{
public CommandType CommandType => CommandType.EndHostConditionalRendering;
public static void Run(IRenderer renderer)
public static void Run(ref EndHostConditionalRenderingCommand command, ThreadedRenderer threaded, IRenderer renderer)
{
renderer.Pipeline.EndHostConditionalRendering();
}

View file

@ -1,6 +1,6 @@
namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct EndTransformFeedbackCommand : IGALCommand
struct EndTransformFeedbackCommand : IGALCommand, IGALCommand<EndTransformFeedbackCommand>
{
public CommandType CommandType => CommandType.EndTransformFeedback;

View file

@ -4,4 +4,9 @@
{
CommandType CommandType { get; }
}
interface IGALCommand<T> where T : IGALCommand
{
abstract static void Run(ref T command, ThreadedRenderer threaded, IRenderer renderer);
}
}

View file

@ -3,7 +3,7 @@ using Ryujinx.Graphics.GAL.Multithreading.Resources;
namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Program
{
struct ProgramCheckLinkCommand : IGALCommand
struct ProgramCheckLinkCommand : IGALCommand, IGALCommand<ProgramCheckLinkCommand>
{
public CommandType CommandType => CommandType.ProgramCheckLink;
private TableRef<ThreadedProgram> _program;

View file

@ -3,7 +3,7 @@ using Ryujinx.Graphics.GAL.Multithreading.Resources;
namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Program
{
struct ProgramDisposeCommand : IGALCommand
struct ProgramDisposeCommand : IGALCommand, IGALCommand<ProgramDisposeCommand>
{
public CommandType CommandType => CommandType.ProgramDispose;
private TableRef<ThreadedProgram> _program;

View file

@ -3,7 +3,7 @@ using Ryujinx.Graphics.GAL.Multithreading.Resources;
namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Program
{
struct ProgramGetBinaryCommand : IGALCommand
struct ProgramGetBinaryCommand : IGALCommand, IGALCommand<ProgramGetBinaryCommand>
{
public CommandType CommandType => CommandType.ProgramGetBinary;
private TableRef<ThreadedProgram> _program;

View file

@ -3,7 +3,7 @@ using System;
namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Renderer
{
struct ActionCommand : IGALCommand
struct ActionCommand : IGALCommand, IGALCommand<ActionCommand>
{
public CommandType CommandType => CommandType.Action;
private TableRef<Action> _action;

View file

@ -1,6 +1,6 @@
namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Renderer
{
struct CreateBufferCommand : IGALCommand
struct CreateBufferCommand : IGALCommand, IGALCommand<CreateBufferCommand>
{
public CommandType CommandType => CommandType.CreateBuffer;
private BufferHandle _threadedHandle;

View file

@ -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<CreateProgramCommand>
{
public CommandType CommandType => CommandType.CreateProgram;
private TableRef<IProgramRequest> _request;

View file

@ -3,7 +3,7 @@ using Ryujinx.Graphics.GAL.Multithreading.Resources;
namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Renderer
{
struct CreateSamplerCommand : IGALCommand
struct CreateSamplerCommand : IGALCommand, IGALCommand<CreateSamplerCommand>
{
public CommandType CommandType => CommandType.CreateSampler;
private TableRef<ThreadedSampler> _sampler;

View file

@ -1,6 +1,6 @@
namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Renderer
{
struct CreateSyncCommand : IGALCommand
struct CreateSyncCommand : IGALCommand, IGALCommand<CreateSyncCommand>
{
public CommandType CommandType => CommandType.CreateSync;
private ulong _id;

View file

@ -3,7 +3,7 @@ using Ryujinx.Graphics.GAL.Multithreading.Resources;
namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Renderer
{
struct CreateTextureCommand : IGALCommand
struct CreateTextureCommand : IGALCommand, IGALCommand<CreateTextureCommand>
{
public CommandType CommandType => CommandType.CreateTexture;
private TableRef<ThreadedTexture> _texture;

View file

@ -2,7 +2,7 @@
namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Renderer
{
struct GetCapabilitiesCommand : IGALCommand
struct GetCapabilitiesCommand : IGALCommand, IGALCommand<GetCapabilitiesCommand>
{
public CommandType CommandType => CommandType.GetCapabilities;
private TableRef<ResultBox<Capabilities>> _result;

View file

@ -1,6 +1,6 @@
namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Renderer
{
struct PreFrameCommand : IGALCommand
struct PreFrameCommand : IGALCommand, IGALCommand<PreFrameCommand>
{
public CommandType CommandType => CommandType.PreFrame;

View file

@ -4,7 +4,7 @@ using System;
namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Renderer
{
struct ReportCounterCommand : IGALCommand
struct ReportCounterCommand : IGALCommand, IGALCommand<ReportCounterCommand>
{
public CommandType CommandType => CommandType.ReportCounter;
private TableRef<ThreadedCounterEvent> _event;

View file

@ -1,6 +1,6 @@
namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Renderer
{
struct ResetCounterCommand : IGALCommand
struct ResetCounterCommand : IGALCommand, IGALCommand<ResetCounterCommand>
{
public CommandType CommandType => CommandType.ResetCounter;
private CounterType _type;

View file

@ -1,6 +1,6 @@
namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Renderer
{
struct UpdateCountersCommand : IGALCommand
struct UpdateCountersCommand : IGALCommand, IGALCommand<UpdateCountersCommand>
{
public CommandType CommandType => CommandType.UpdateCounters;

View file

@ -3,7 +3,7 @@ using Ryujinx.Graphics.GAL.Multithreading.Resources;
namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Sampler
{
struct SamplerDisposeCommand : IGALCommand
struct SamplerDisposeCommand : IGALCommand, IGALCommand<SamplerDisposeCommand>
{
public CommandType CommandType => CommandType.SamplerDispose;
private TableRef<ThreadedSampler> _sampler;

View file

@ -1,6 +1,6 @@
namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct SetAlphaTestCommand : IGALCommand
struct SetAlphaTestCommand : IGALCommand, IGALCommand<SetAlphaTestCommand>
{
public CommandType CommandType => CommandType.SetAlphaTest;
private bool _enable;

View file

@ -1,6 +1,6 @@
namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct SetBlendStateCommand : IGALCommand
struct SetBlendStateCommand : IGALCommand, IGALCommand<SetBlendStateCommand>
{
public CommandType CommandType => CommandType.SetBlendState;
private int _index;

View file

@ -1,6 +1,6 @@
namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct SetDepthBiasCommand : IGALCommand
struct SetDepthBiasCommand : IGALCommand, IGALCommand<SetDepthBiasCommand>
{
public CommandType CommandType => CommandType.SetDepthBias;
private PolygonModeMask _enables;

View file

@ -1,6 +1,6 @@
namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct SetDepthClampCommand : IGALCommand
struct SetDepthClampCommand : IGALCommand, IGALCommand<SetDepthClampCommand>
{
public CommandType CommandType => CommandType.SetDepthClamp;
private bool _clamp;

View file

@ -1,6 +1,6 @@
namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct SetDepthModeCommand : IGALCommand
struct SetDepthModeCommand : IGALCommand, IGALCommand<SetDepthModeCommand>
{
public CommandType CommandType => CommandType.SetDepthMode;
private DepthMode _mode;

View file

@ -1,6 +1,6 @@
namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct SetDepthTestCommand : IGALCommand
struct SetDepthTestCommand : IGALCommand, IGALCommand<SetDepthTestCommand>
{
public CommandType CommandType => CommandType.SetDepthTest;
private DepthTestDescriptor _depthTest;

View file

@ -1,6 +1,6 @@
namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct SetFaceCullingCommand : IGALCommand
struct SetFaceCullingCommand : IGALCommand, IGALCommand<SetFaceCullingCommand>
{
public CommandType CommandType => CommandType.SetFaceCulling;
private bool _enable;

View file

@ -1,6 +1,6 @@
namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct SetFrontFaceCommand : IGALCommand
struct SetFrontFaceCommand : IGALCommand, IGALCommand<SetFrontFaceCommand>
{
public CommandType CommandType => CommandType.SetFrontFace;
private FrontFace _frontFace;

View file

@ -3,7 +3,7 @@ using Ryujinx.Graphics.GAL.Multithreading.Resources;
namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct SetImageCommand : IGALCommand
struct SetImageCommand : IGALCommand, IGALCommand<SetImageCommand>
{
public CommandType CommandType => CommandType.SetImage;
private int _binding;

View file

@ -1,6 +1,6 @@
namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct SetIndexBufferCommand : IGALCommand
struct SetIndexBufferCommand : IGALCommand, IGALCommand<SetIndexBufferCommand>
{
public CommandType CommandType => CommandType.SetIndexBuffer;
private BufferRange _buffer;

View file

@ -1,6 +1,6 @@
namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct SetLineParametersCommand : IGALCommand
struct SetLineParametersCommand : IGALCommand, IGALCommand<SetLineParametersCommand>
{
public CommandType CommandType => CommandType.SetLineParameters;
private float _width;

View file

@ -1,6 +1,6 @@
namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct SetLogicOpStateCommand : IGALCommand
struct SetLogicOpStateCommand : IGALCommand, IGALCommand<SetLogicOpStateCommand>
{
public CommandType CommandType => CommandType.SetLogicOpState;
private bool _enable;

View file

@ -1,6 +1,6 @@
namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct SetMultisampleStateCommand : IGALCommand
struct SetMultisampleStateCommand : IGALCommand, IGALCommand<SetMultisampleStateCommand>
{
public CommandType CommandType => CommandType.SetMultisampleState;
private MultisampleDescriptor _multisample;

View file

@ -3,7 +3,7 @@ using System;
namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct SetPatchParametersCommand : IGALCommand
struct SetPatchParametersCommand : IGALCommand, IGALCommand<SetPatchParametersCommand>
{
public CommandType CommandType => CommandType.SetPatchParameters;
private int _vertices;

View file

@ -1,6 +1,6 @@
namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct SetPointParametersCommand : IGALCommand
struct SetPointParametersCommand : IGALCommand, IGALCommand<SetPointParametersCommand>
{
public CommandType CommandType => CommandType.SetPointParameters;
private float _size;

View file

@ -1,6 +1,6 @@
namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct SetPolygonModeCommand : IGALCommand
struct SetPolygonModeCommand : IGALCommand, IGALCommand<SetPolygonModeCommand>
{
public CommandType CommandType => CommandType.SetPolygonMode;
private PolygonMode _frontMode;

View file

@ -1,6 +1,6 @@
namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct SetPrimitiveRestartCommand : IGALCommand
struct SetPrimitiveRestartCommand : IGALCommand, IGALCommand<SetPrimitiveRestartCommand>
{
public CommandType CommandType => CommandType.SetPrimitiveRestart;
private bool _enable;

View file

@ -1,6 +1,6 @@
namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct SetPrimitiveTopologyCommand : IGALCommand
struct SetPrimitiveTopologyCommand : IGALCommand, IGALCommand<SetPrimitiveTopologyCommand>
{
public CommandType CommandType => CommandType.SetPrimitiveTopology;
private PrimitiveTopology _topology;

View file

@ -3,7 +3,7 @@ using Ryujinx.Graphics.GAL.Multithreading.Resources;
namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct SetProgramCommand : IGALCommand
struct SetProgramCommand : IGALCommand, IGALCommand<SetProgramCommand>
{
public CommandType CommandType => CommandType.SetProgram;
private TableRef<IProgram> _program;

View file

@ -1,6 +1,6 @@
namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct SetRasterizerDiscardCommand : IGALCommand
struct SetRasterizerDiscardCommand : IGALCommand, IGALCommand<SetRasterizerDiscardCommand>
{
public CommandType CommandType => CommandType.SetRasterizerDiscard;
private bool _discard;

View file

@ -3,7 +3,7 @@ using System;
namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct SetRenderTargetColorMasksCommand : IGALCommand
struct SetRenderTargetColorMasksCommand : IGALCommand, IGALCommand<SetRenderTargetColorMasksCommand>
{
public CommandType CommandType => CommandType.SetRenderTargetColorMasks;
private SpanRef<uint> _componentMask;

View file

@ -1,6 +1,6 @@
namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct SetRenderTargetScaleCommand : IGALCommand
struct SetRenderTargetScaleCommand : IGALCommand, IGALCommand<SetRenderTargetScaleCommand>
{
public CommandType CommandType => CommandType.SetRenderTargetScale;
private float _scale;

View file

@ -4,7 +4,7 @@ using System.Linq;
namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct SetRenderTargetsCommand : IGALCommand
struct SetRenderTargetsCommand : IGALCommand, IGALCommand<SetRenderTargetsCommand>
{
public CommandType CommandType => CommandType.SetRenderTargets;
private TableRef<ITexture[]> _colors;

View file

@ -2,7 +2,7 @@
namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct SetScissorsCommand : IGALCommand
struct SetScissorsCommand : IGALCommand, IGALCommand<SetScissorsCommand>
{
public CommandType CommandType => CommandType.SetScissor;
private SpanRef<Rectangle<int>> _scissors;

View file

@ -1,6 +1,6 @@
namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct SetStencilTestCommand : IGALCommand
struct SetStencilTestCommand : IGALCommand, IGALCommand<SetStencilTestCommand>
{
public CommandType CommandType => CommandType.SetStencilTest;
private StencilTestDescriptor _stencilTest;

View file

@ -3,7 +3,7 @@ using System;
namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct SetStorageBuffersCommand : IGALCommand
struct SetStorageBuffersCommand : IGALCommand, IGALCommand<SetStorageBuffersCommand>
{
public CommandType CommandType => CommandType.SetStorageBuffers;
private SpanRef<BufferAssignment> _buffers;

View file

@ -4,7 +4,7 @@ using Ryujinx.Graphics.Shader;
namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct SetTextureAndSamplerCommand : IGALCommand
struct SetTextureAndSamplerCommand : IGALCommand, IGALCommand<SetTextureAndSamplerCommand>
{
public CommandType CommandType => CommandType.SetTextureAndSampler;
private ShaderStage _stage;

View file

@ -3,7 +3,7 @@ using System;
namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct SetTransformFeedbackBuffersCommand : IGALCommand
struct SetTransformFeedbackBuffersCommand : IGALCommand, IGALCommand<SetTransformFeedbackBuffersCommand>
{
public CommandType CommandType => CommandType.SetTransformFeedbackBuffers;
private SpanRef<BufferRange> _buffers;

View file

@ -3,7 +3,7 @@ using System;
namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct SetUniformBuffersCommand : IGALCommand
struct SetUniformBuffersCommand : IGALCommand, IGALCommand<SetUniformBuffersCommand>
{
public CommandType CommandType => CommandType.SetUniformBuffers;
private SpanRef<BufferAssignment> _buffers;

View file

@ -1,6 +1,6 @@
namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct SetUserClipDistanceCommand : IGALCommand
struct SetUserClipDistanceCommand : IGALCommand, IGALCommand<SetUserClipDistanceCommand>
{
public CommandType CommandType => CommandType.SetUserClipDistance;
private int _index;

View file

@ -3,7 +3,7 @@ using System;
namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct SetVertexAttribsCommand : IGALCommand
struct SetVertexAttribsCommand : IGALCommand, IGALCommand<SetVertexAttribsCommand>
{
public CommandType CommandType => CommandType.SetVertexAttribs;
private SpanRef<VertexAttribDescriptor> _vertexAttribs;

View file

@ -3,7 +3,7 @@ using System;
namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct SetVertexBuffersCommand : IGALCommand
struct SetVertexBuffersCommand : IGALCommand, IGALCommand<SetVertexBuffersCommand>
{
public CommandType CommandType => CommandType.SetVertexBuffers;
private SpanRef<VertexBufferDescriptor> _vertexBuffers;

View file

@ -3,7 +3,7 @@ using System;
namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct SetViewportsCommand : IGALCommand
struct SetViewportsCommand : IGALCommand, IGALCommand<SetViewportsCommand>
{
public CommandType CommandType => CommandType.SetViewports;
private SpanRef<Viewport> _viewports;

View file

@ -3,7 +3,7 @@ using Ryujinx.Graphics.GAL.Multithreading.Resources;
namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Texture
{
struct TextureCopyToCommand : IGALCommand
struct TextureCopyToCommand : IGALCommand, IGALCommand<TextureCopyToCommand>
{
public CommandType CommandType => CommandType.TextureCopyTo;
private TableRef<ThreadedTexture> _texture;

View file

@ -3,7 +3,7 @@ using Ryujinx.Graphics.GAL.Multithreading.Resources;
namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Texture
{
struct TextureCopyToScaledCommand : IGALCommand
struct TextureCopyToScaledCommand : IGALCommand, IGALCommand<TextureCopyToScaledCommand>
{
public CommandType CommandType => CommandType.TextureCopyToScaled;
private TableRef<ThreadedTexture> _texture;

View file

@ -3,7 +3,7 @@ using Ryujinx.Graphics.GAL.Multithreading.Resources;
namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Texture
{
struct TextureCopyToSliceCommand : IGALCommand
struct TextureCopyToSliceCommand : IGALCommand, IGALCommand<TextureCopyToSliceCommand>
{
public CommandType CommandType => CommandType.TextureCopyToSlice;
private TableRef<ThreadedTexture> _texture;

View file

@ -3,7 +3,7 @@ using Ryujinx.Graphics.GAL.Multithreading.Resources;
namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Texture
{
struct TextureCreateViewCommand : IGALCommand
struct TextureCreateViewCommand : IGALCommand, IGALCommand<TextureCreateViewCommand>
{
public CommandType CommandType => CommandType.TextureCreateView;
private TableRef<ThreadedTexture> _texture;

View file

@ -4,7 +4,7 @@ using System;
namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Texture
{
struct TextureGetDataCommand : IGALCommand
struct TextureGetDataCommand : IGALCommand, IGALCommand<TextureGetDataCommand>
{
public CommandType CommandType => CommandType.TextureGetData;
private TableRef<ThreadedTexture> _texture;

View file

@ -4,7 +4,7 @@ using System;
namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Texture
{
struct TextureGetDataSliceCommand : IGALCommand
struct TextureGetDataSliceCommand : IGALCommand, IGALCommand<TextureGetDataSliceCommand>
{
public CommandType CommandType => CommandType.TextureGetDataSlice;
private TableRef<ThreadedTexture> _texture;

View file

@ -3,7 +3,7 @@ using Ryujinx.Graphics.GAL.Multithreading.Resources;
namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Texture
{
struct TextureReleaseCommand : IGALCommand
struct TextureReleaseCommand : IGALCommand, IGALCommand<TextureReleaseCommand>
{
public CommandType CommandType => CommandType.TextureRelease;
private TableRef<ThreadedTexture> _texture;

View file

@ -4,7 +4,7 @@ using System;
namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Texture
{
struct TextureSetDataCommand : IGALCommand
struct TextureSetDataCommand : IGALCommand, IGALCommand<TextureSetDataCommand>
{
public CommandType CommandType => CommandType.TextureSetData;
private TableRef<ThreadedTexture> _texture;

View file

@ -4,7 +4,7 @@ using System;
namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Texture
{
struct TextureSetDataSliceCommand : IGALCommand
struct TextureSetDataSliceCommand : IGALCommand, IGALCommand<TextureSetDataSliceCommand>
{
public CommandType CommandType => CommandType.TextureSetDataSlice;
private TableRef<ThreadedTexture> _texture;

View file

@ -4,7 +4,7 @@ using System;
namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Texture
{
struct TextureSetDataSliceRegionCommand : IGALCommand
struct TextureSetDataSliceRegionCommand : IGALCommand, IGALCommand<TextureSetDataSliceRegionCommand>
{
public CommandType CommandType => CommandType.TextureSetDataSliceRegion;
private TableRef<ThreadedTexture> _texture;

View file

@ -3,7 +3,7 @@ using Ryujinx.Graphics.GAL.Multithreading.Resources;
namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Texture
{
struct TextureSetStorageCommand : IGALCommand
struct TextureSetStorageCommand : IGALCommand, IGALCommand<TextureSetStorageCommand>
{
public CommandType CommandType => CommandType.TextureSetStorage;
private TableRef<ThreadedTexture> _texture;

View file

@ -1,6 +1,6 @@
namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct TextureBarrierCommand : IGALCommand
struct TextureBarrierCommand : IGALCommand, IGALCommand<TextureBarrierCommand>
{
public CommandType CommandType => CommandType.TextureBarrier;

View file

@ -1,6 +1,6 @@
namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct TextureBarrierTiledCommand : IGALCommand
struct TextureBarrierTiledCommand : IGALCommand, IGALCommand<TextureBarrierTiledCommand>
{
public CommandType CommandType => CommandType.TextureBarrierTiled;

View file

@ -3,7 +3,7 @@ using Ryujinx.Graphics.GAL.Multithreading.Resources;
namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct TryHostConditionalRenderingCommand : IGALCommand
struct TryHostConditionalRenderingCommand : IGALCommand, IGALCommand<TryHostConditionalRenderingCommand>
{
public CommandType CommandType => CommandType.TryHostConditionalRendering;
private TableRef<ThreadedCounterEvent> _value;

View file

@ -3,7 +3,7 @@ using Ryujinx.Graphics.GAL.Multithreading.Resources;
namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct TryHostConditionalRenderingFlushCommand : IGALCommand
struct TryHostConditionalRenderingFlushCommand : IGALCommand, IGALCommand<TryHostConditionalRenderingFlushCommand>
{
public CommandType CommandType => CommandType.TryHostConditionalRenderingFlush;
private TableRef<ThreadedCounterEvent> _value;

View file

@ -2,7 +2,7 @@
namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct UpdateRenderScaleCommand : IGALCommand
struct UpdateRenderScaleCommand : IGALCommand, IGALCommand<UpdateRenderScaleCommand>
{
public CommandType CommandType => CommandType.UpdateRenderScale;
private SpanRef<float> _scales;

View file

@ -4,7 +4,7 @@ using System;
namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Window
{
struct WindowPresentCommand : IGALCommand
struct WindowPresentCommand : IGALCommand, IGALCommand<WindowPresentCommand>
{
public CommandType CommandType => CommandType.WindowPresent;
private TableRef<ThreadedTexture> _texture;