[Ryujinx.Graphics.GAL] Address dotnet-format issues (#5366)

* dotnet format style --severity info

Some changes were manually reverted.

* dotnet format analyzers --serverity info

Some changes have been minimally adapted.

* Restore a few unused methods and variables

* Silence dotnet format IDE0052 warnings

* Address dotnet format CA1816 warnings

* Address or silence dotnet format CA1069 warnings

* Address remaining dotnet format analyzer warnings

* Address review comments

* Address most dotnet format whitespace warnings

* Apply dotnet format whitespace formatting

A few of them have been manually reverted and the corresponding warning was silenced

* Revert formatting changes for while and for-loops

* Another rebase, another dotnet format run

* Run dotnet format whitespace after rebase

* Run dotnet format style after rebase

* Run dotnet format analyzers after rebase

* Run dotnet format after rebase and remove unused usings

- analyzers
- style
- whitespace

* Disable 'prefer switch expression' rule

* Add comments to disabled warnings

* Simplify properties and array initialization, Use const when possible, Remove trailing commas

* Start working on disabled warnings

* Address IDE0251 warnings

* Revert "Simplify properties and array initialization, Use const when possible, Remove trailing commas"

This reverts commit 9462e4136c0a2100dc28b20cf9542e06790aa67e.

* dotnet format whitespace after rebase

* First dotnet format pass

* Address review feedback

* Add trailing commas

* Remove SuppressMessage for IDE0066

* Make explicit Equals implementation implicit
This commit is contained in:
TSRBerry 2023-06-28 20:20:10 +02:00 committed by GitHub
parent 16fa983704
commit 7c989f88bd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
161 changed files with 481 additions and 439 deletions

View file

@ -2,7 +2,7 @@
{
struct BarrierCommand : IGALCommand, IGALCommand<BarrierCommand>
{
public CommandType CommandType => CommandType.Barrier;
public readonly CommandType CommandType => CommandType.Barrier;
public static void Run(ref BarrierCommand command, ThreadedRenderer threaded, IRenderer renderer)
{

View file

@ -2,7 +2,7 @@
{
struct BeginTransformFeedbackCommand : IGALCommand, IGALCommand<BeginTransformFeedbackCommand>
{
public CommandType CommandType => CommandType.BeginTransformFeedback;
public readonly CommandType CommandType => CommandType.BeginTransformFeedback;
private PrimitiveTopology _topology;
public void Set(PrimitiveTopology topology)

View file

@ -2,7 +2,7 @@
{
struct BufferDisposeCommand : IGALCommand, IGALCommand<BufferDisposeCommand>
{
public CommandType CommandType => CommandType.BufferDispose;
public readonly CommandType CommandType => CommandType.BufferDispose;
private BufferHandle _buffer;
public void Set(BufferHandle buffer)

View file

@ -1,11 +1,10 @@
using Ryujinx.Graphics.GAL.Multithreading.Model;
using System;
namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Buffer
{
struct BufferGetDataCommand : IGALCommand, IGALCommand<BufferGetDataCommand>
{
public CommandType CommandType => CommandType.BufferGetData;
public readonly CommandType CommandType => CommandType.BufferGetData;
private BufferHandle _buffer;
private int _offset;
private int _size;

View file

@ -5,7 +5,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Buffer
{
struct BufferSetDataCommand : IGALCommand, IGALCommand<BufferSetDataCommand>
{
public CommandType CommandType => CommandType.BufferSetData;
public readonly CommandType CommandType => CommandType.BufferSetData;
private BufferHandle _buffer;
private int _offset;
private SpanRef<byte> _data;

View file

@ -2,7 +2,7 @@
{
struct ClearBufferCommand : IGALCommand, IGALCommand<ClearBufferCommand>
{
public CommandType CommandType => CommandType.ClearBuffer;
public readonly CommandType CommandType => CommandType.ClearBuffer;
private BufferHandle _destination;
private int _offset;
private int _size;

View file

@ -2,7 +2,7 @@
{
struct ClearRenderTargetColorCommand : IGALCommand, IGALCommand<ClearRenderTargetColorCommand>
{
public CommandType CommandType => CommandType.ClearRenderTargetColor;
public readonly CommandType CommandType => CommandType.ClearRenderTargetColor;
private int _index;
private int _layer;
private int _layerCount;

View file

@ -2,7 +2,7 @@
{
struct ClearRenderTargetDepthStencilCommand : IGALCommand, IGALCommand<ClearRenderTargetDepthStencilCommand>
{
public CommandType CommandType => CommandType.ClearRenderTargetDepthStencil;
public readonly CommandType CommandType => CommandType.ClearRenderTargetDepthStencil;
private int _layer;
private int _layerCount;
private float _depthValue;

View file

@ -2,7 +2,7 @@
{
struct CommandBufferBarrierCommand : IGALCommand, IGALCommand<CommandBufferBarrierCommand>
{
public CommandType CommandType => CommandType.CommandBufferBarrier;
public readonly CommandType CommandType => CommandType.CommandBufferBarrier;
public static void Run(ref CommandBufferBarrierCommand command, ThreadedRenderer threaded, IRenderer renderer)
{

View file

@ -2,7 +2,7 @@
{
struct CopyBufferCommand : IGALCommand, IGALCommand<CopyBufferCommand>
{
public CommandType CommandType => CommandType.CopyBuffer;
public readonly CommandType CommandType => CommandType.CopyBuffer;
private BufferHandle _source;
private BufferHandle _destination;
private int _srcOffset;

View file

@ -5,7 +5,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands.CounterEvent
{
struct CounterEventDisposeCommand : IGALCommand, IGALCommand<CounterEventDisposeCommand>
{
public CommandType CommandType => CommandType.CounterEventDispose;
public readonly CommandType CommandType => CommandType.CounterEventDispose;
private TableRef<ThreadedCounterEvent> _event;
public void Set(TableRef<ThreadedCounterEvent> evt)

View file

@ -5,7 +5,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands.CounterEvent
{
struct CounterEventFlushCommand : IGALCommand, IGALCommand<CounterEventFlushCommand>
{
public CommandType CommandType => CommandType.CounterEventFlush;
public readonly CommandType CommandType => CommandType.CounterEventFlush;
private TableRef<ThreadedCounterEvent> _event;
public void Set(TableRef<ThreadedCounterEvent> evt)

View file

@ -2,7 +2,7 @@
{
struct DispatchComputeCommand : IGALCommand, IGALCommand<DispatchComputeCommand>
{
public CommandType CommandType => CommandType.DispatchCompute;
public readonly CommandType CommandType => CommandType.DispatchCompute;
private int _groupsX;
private int _groupsY;
private int _groupsZ;

View file

@ -2,7 +2,7 @@
{
struct DrawIndexedCommand : IGALCommand, IGALCommand<DrawIndexedCommand>
{
public CommandType CommandType => CommandType.DrawIndexed;
public readonly CommandType CommandType => CommandType.DrawIndexed;
private int _indexCount;
private int _instanceCount;
private int _firstIndex;

View file

@ -2,7 +2,7 @@
{
struct DrawCommand : IGALCommand, IGALCommand<DrawCommand>
{
public CommandType CommandType => CommandType.Draw;
public readonly CommandType CommandType => CommandType.Draw;
private int _vertexCount;
private int _instanceCount;
private int _firstVertex;

View file

@ -2,7 +2,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct DrawIndexedIndirectCommand : IGALCommand, IGALCommand<DrawIndexedIndirectCommand>
{
public CommandType CommandType => CommandType.DrawIndexedIndirect;
public readonly CommandType CommandType => CommandType.DrawIndexedIndirect;
private BufferRange _indirectBuffer;
public void Set(BufferRange indirectBuffer)

View file

@ -2,7 +2,7 @@
{
struct DrawIndexedIndirectCountCommand : IGALCommand, IGALCommand<DrawIndexedIndirectCountCommand>
{
public CommandType CommandType => CommandType.DrawIndexedIndirectCount;
public readonly CommandType CommandType => CommandType.DrawIndexedIndirectCount;
private BufferRange _indirectBuffer;
private BufferRange _parameterBuffer;
private int _maxDrawCount;

View file

@ -2,7 +2,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct DrawIndirectCommand : IGALCommand, IGALCommand<DrawIndirectCommand>
{
public CommandType CommandType => CommandType.DrawIndirect;
public readonly CommandType CommandType => CommandType.DrawIndirect;
private BufferRange _indirectBuffer;
public void Set(BufferRange indirectBuffer)

View file

@ -2,7 +2,7 @@
{
struct DrawIndirectCountCommand : IGALCommand, IGALCommand<DrawIndirectCountCommand>
{
public CommandType CommandType => CommandType.DrawIndirectCount;
public readonly CommandType CommandType => CommandType.DrawIndirectCount;
private BufferRange _indirectBuffer;
private BufferRange _parameterBuffer;
private int _maxDrawCount;

View file

@ -5,7 +5,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct DrawTextureCommand : IGALCommand, IGALCommand<DrawTextureCommand>
{
public CommandType CommandType => CommandType.DrawTexture;
public readonly CommandType CommandType => CommandType.DrawTexture;
private TableRef<ITexture> _texture;
private TableRef<ISampler> _sampler;
private Extents2DF _srcRegion;

View file

@ -2,7 +2,7 @@
{
struct EndHostConditionalRenderingCommand : IGALCommand, IGALCommand<EndHostConditionalRenderingCommand>
{
public CommandType CommandType => CommandType.EndHostConditionalRendering;
public readonly CommandType CommandType => CommandType.EndHostConditionalRendering;
public static void Run(ref EndHostConditionalRenderingCommand command, ThreadedRenderer threaded, IRenderer renderer)
{

View file

@ -2,7 +2,7 @@
{
struct EndTransformFeedbackCommand : IGALCommand, IGALCommand<EndTransformFeedbackCommand>
{
public CommandType CommandType => CommandType.EndTransformFeedback;
public readonly CommandType CommandType => CommandType.EndTransformFeedback;
public static void Run(ref EndTransformFeedbackCommand command, ThreadedRenderer threaded, IRenderer renderer)
{

View file

@ -5,7 +5,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Program
{
struct ProgramCheckLinkCommand : IGALCommand, IGALCommand<ProgramCheckLinkCommand>
{
public CommandType CommandType => CommandType.ProgramCheckLink;
public readonly CommandType CommandType => CommandType.ProgramCheckLink;
private TableRef<ThreadedProgram> _program;
private bool _blocking;
private TableRef<ResultBox<ProgramLinkStatus>> _result;

View file

@ -5,7 +5,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Program
{
struct ProgramDisposeCommand : IGALCommand, IGALCommand<ProgramDisposeCommand>
{
public CommandType CommandType => CommandType.ProgramDispose;
public readonly CommandType CommandType => CommandType.ProgramDispose;
private TableRef<ThreadedProgram> _program;
public void Set(TableRef<ThreadedProgram> program)

View file

@ -5,7 +5,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Program
{
struct ProgramGetBinaryCommand : IGALCommand, IGALCommand<ProgramGetBinaryCommand>
{
public CommandType CommandType => CommandType.ProgramGetBinary;
public readonly CommandType CommandType => CommandType.ProgramGetBinary;
private TableRef<ThreadedProgram> _program;
private TableRef<ResultBox<byte[]>> _result;

View file

@ -5,7 +5,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Renderer
{
struct ActionCommand : IGALCommand, IGALCommand<ActionCommand>
{
public CommandType CommandType => CommandType.Action;
public readonly CommandType CommandType => CommandType.Action;
private TableRef<Action> _action;
public void Set(TableRef<Action> action)

View file

@ -2,7 +2,7 @@
{
struct CreateBufferAccessCommand : IGALCommand, IGALCommand<CreateBufferAccessCommand>
{
public CommandType CommandType => CommandType.CreateBufferAccess;
public readonly CommandType CommandType => CommandType.CreateBufferAccess;
private BufferHandle _threadedHandle;
private int _size;
private BufferAccess _access;

View file

@ -2,7 +2,7 @@
{
struct CreateBufferCommand : IGALCommand, IGALCommand<CreateBufferCommand>
{
public CommandType CommandType => CommandType.CreateBuffer;
public readonly CommandType CommandType => CommandType.CreateBuffer;
private BufferHandle _threadedHandle;
private int _size;
private BufferHandle _storageHint;

View file

@ -2,7 +2,7 @@
{
struct CreateHostBufferCommand : IGALCommand, IGALCommand<CreateHostBufferCommand>
{
public CommandType CommandType => CommandType.CreateHostBuffer;
public readonly CommandType CommandType => CommandType.CreateHostBuffer;
private BufferHandle _threadedHandle;
private nint _pointer;
private int _size;

View file

@ -5,7 +5,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Renderer
{
struct CreateProgramCommand : IGALCommand, IGALCommand<CreateProgramCommand>
{
public CommandType CommandType => CommandType.CreateProgram;
public readonly CommandType CommandType => CommandType.CreateProgram;
private TableRef<IProgramRequest> _request;
public void Set(TableRef<IProgramRequest> request)

View file

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

View file

@ -2,7 +2,7 @@
{
struct CreateSyncCommand : IGALCommand, IGALCommand<CreateSyncCommand>
{
public CommandType CommandType => CommandType.CreateSync;
public readonly CommandType CommandType => CommandType.CreateSync;
private ulong _id;
private bool _strict;

View file

@ -5,7 +5,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Renderer
{
struct CreateTextureCommand : IGALCommand, IGALCommand<CreateTextureCommand>
{
public CommandType CommandType => CommandType.CreateTexture;
public readonly CommandType CommandType => CommandType.CreateTexture;
private TableRef<ThreadedTexture> _texture;
private TextureCreateInfo _info;
private float _scale;

View file

@ -4,7 +4,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Renderer
{
struct GetCapabilitiesCommand : IGALCommand, IGALCommand<GetCapabilitiesCommand>
{
public CommandType CommandType => CommandType.GetCapabilities;
public readonly CommandType CommandType => CommandType.GetCapabilities;
private TableRef<ResultBox<Capabilities>> _result;
public void Set(TableRef<ResultBox<Capabilities>> result)

View file

@ -2,7 +2,7 @@
{
struct PreFrameCommand : IGALCommand, IGALCommand<PreFrameCommand>
{
public CommandType CommandType => CommandType.PreFrame;
public readonly CommandType CommandType => CommandType.PreFrame;
public static void Run(ref PreFrameCommand command, ThreadedRenderer threaded, IRenderer renderer)
{

View file

@ -6,7 +6,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Renderer
{
struct ReportCounterCommand : IGALCommand, IGALCommand<ReportCounterCommand>
{
public CommandType CommandType => CommandType.ReportCounter;
public readonly CommandType CommandType => CommandType.ReportCounter;
private TableRef<ThreadedCounterEvent> _event;
private CounterType _type;
private TableRef<EventHandler<ulong>> _resultHandler;

View file

@ -2,7 +2,7 @@
{
struct ResetCounterCommand : IGALCommand, IGALCommand<ResetCounterCommand>
{
public CommandType CommandType => CommandType.ResetCounter;
public readonly CommandType CommandType => CommandType.ResetCounter;
private CounterType _type;
public void Set(CounterType type)

View file

@ -2,7 +2,7 @@
{
struct UpdateCountersCommand : IGALCommand, IGALCommand<UpdateCountersCommand>
{
public CommandType CommandType => CommandType.UpdateCounters;
public readonly CommandType CommandType => CommandType.UpdateCounters;
public static void Run(ref UpdateCountersCommand command, ThreadedRenderer threaded, IRenderer renderer)
{

View file

@ -5,7 +5,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Sampler
{
struct SamplerDisposeCommand : IGALCommand, IGALCommand<SamplerDisposeCommand>
{
public CommandType CommandType => CommandType.SamplerDispose;
public readonly CommandType CommandType => CommandType.SamplerDispose;
private TableRef<ThreadedSampler> _sampler;
public void Set(TableRef<ThreadedSampler> sampler)

View file

@ -2,7 +2,7 @@
{
struct SetAlphaTestCommand : IGALCommand, IGALCommand<SetAlphaTestCommand>
{
public CommandType CommandType => CommandType.SetAlphaTest;
public readonly CommandType CommandType => CommandType.SetAlphaTest;
private bool _enable;
private float _reference;
private CompareOp _op;

View file

@ -2,7 +2,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct SetBlendStateAdvancedCommand : IGALCommand, IGALCommand<SetBlendStateAdvancedCommand>
{
public CommandType CommandType => CommandType.SetBlendStateAdvanced;
public readonly CommandType CommandType => CommandType.SetBlendStateAdvanced;
private AdvancedBlendDescriptor _blend;
public void Set(AdvancedBlendDescriptor blend)

View file

@ -2,7 +2,7 @@
{
struct SetBlendStateCommand : IGALCommand, IGALCommand<SetBlendStateCommand>
{
public CommandType CommandType => CommandType.SetBlendState;
public readonly CommandType CommandType => CommandType.SetBlendState;
private int _index;
private BlendDescriptor _blend;

View file

@ -2,7 +2,7 @@
{
struct SetDepthBiasCommand : IGALCommand, IGALCommand<SetDepthBiasCommand>
{
public CommandType CommandType => CommandType.SetDepthBias;
public readonly CommandType CommandType => CommandType.SetDepthBias;
private PolygonModeMask _enables;
private float _factor;
private float _units;

View file

@ -2,7 +2,7 @@
{
struct SetDepthClampCommand : IGALCommand, IGALCommand<SetDepthClampCommand>
{
public CommandType CommandType => CommandType.SetDepthClamp;
public readonly CommandType CommandType => CommandType.SetDepthClamp;
private bool _clamp;
public void Set(bool clamp)

View file

@ -2,7 +2,7 @@
{
struct SetDepthModeCommand : IGALCommand, IGALCommand<SetDepthModeCommand>
{
public CommandType CommandType => CommandType.SetDepthMode;
public readonly CommandType CommandType => CommandType.SetDepthMode;
private DepthMode _mode;
public void Set(DepthMode mode)

View file

@ -2,7 +2,7 @@
{
struct SetDepthTestCommand : IGALCommand, IGALCommand<SetDepthTestCommand>
{
public CommandType CommandType => CommandType.SetDepthTest;
public readonly CommandType CommandType => CommandType.SetDepthTest;
private DepthTestDescriptor _depthTest;
public void Set(DepthTestDescriptor depthTest)

View file

@ -2,7 +2,7 @@
{
struct SetFaceCullingCommand : IGALCommand, IGALCommand<SetFaceCullingCommand>
{
public CommandType CommandType => CommandType.SetFaceCulling;
public readonly CommandType CommandType => CommandType.SetFaceCulling;
private bool _enable;
private Face _face;

View file

@ -2,7 +2,7 @@
{
struct SetFrontFaceCommand : IGALCommand, IGALCommand<SetFrontFaceCommand>
{
public CommandType CommandType => CommandType.SetFrontFace;
public readonly CommandType CommandType => CommandType.SetFrontFace;
private FrontFace _frontFace;
public void Set(FrontFace frontFace)

View file

@ -5,7 +5,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct SetImageCommand : IGALCommand, IGALCommand<SetImageCommand>
{
public CommandType CommandType => CommandType.SetImage;
public readonly CommandType CommandType => CommandType.SetImage;
private int _binding;
private TableRef<ITexture> _texture;
private Format _imageFormat;

View file

@ -2,7 +2,7 @@
{
struct SetIndexBufferCommand : IGALCommand, IGALCommand<SetIndexBufferCommand>
{
public CommandType CommandType => CommandType.SetIndexBuffer;
public readonly CommandType CommandType => CommandType.SetIndexBuffer;
private BufferRange _buffer;
private IndexType _type;

View file

@ -2,7 +2,7 @@
{
struct SetLineParametersCommand : IGALCommand, IGALCommand<SetLineParametersCommand>
{
public CommandType CommandType => CommandType.SetLineParameters;
public readonly CommandType CommandType => CommandType.SetLineParameters;
private float _width;
private bool _smooth;

View file

@ -2,7 +2,7 @@
{
struct SetLogicOpStateCommand : IGALCommand, IGALCommand<SetLogicOpStateCommand>
{
public CommandType CommandType => CommandType.SetLogicOpState;
public readonly CommandType CommandType => CommandType.SetLogicOpState;
private bool _enable;
private LogicalOp _op;

View file

@ -2,7 +2,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct SetMultisampleStateCommand : IGALCommand, IGALCommand<SetMultisampleStateCommand>
{
public CommandType CommandType => CommandType.SetMultisampleState;
public readonly CommandType CommandType => CommandType.SetMultisampleState;
private MultisampleDescriptor _multisample;
public void Set(MultisampleDescriptor multisample)

View file

@ -5,7 +5,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct SetPatchParametersCommand : IGALCommand, IGALCommand<SetPatchParametersCommand>
{
public CommandType CommandType => CommandType.SetPatchParameters;
public readonly CommandType CommandType => CommandType.SetPatchParameters;
private int _vertices;
private Array4<float> _defaultOuterLevel;
private Array2<float> _defaultInnerLevel;

View file

@ -2,7 +2,7 @@
{
struct SetPointParametersCommand : IGALCommand, IGALCommand<SetPointParametersCommand>
{
public CommandType CommandType => CommandType.SetPointParameters;
public readonly CommandType CommandType => CommandType.SetPointParameters;
private float _size;
private bool _isProgramPointSize;
private bool _enablePointSprite;

View file

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

View file

@ -2,7 +2,7 @@
{
struct SetPrimitiveRestartCommand : IGALCommand, IGALCommand<SetPrimitiveRestartCommand>
{
public CommandType CommandType => CommandType.SetPrimitiveRestart;
public readonly CommandType CommandType => CommandType.SetPrimitiveRestart;
private bool _enable;
private int _index;

View file

@ -2,7 +2,7 @@
{
struct SetPrimitiveTopologyCommand : IGALCommand, IGALCommand<SetPrimitiveTopologyCommand>
{
public CommandType CommandType => CommandType.SetPrimitiveTopology;
public readonly CommandType CommandType => CommandType.SetPrimitiveTopology;
private PrimitiveTopology _topology;
public void Set(PrimitiveTopology topology)

View file

@ -5,7 +5,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct SetProgramCommand : IGALCommand, IGALCommand<SetProgramCommand>
{
public CommandType CommandType => CommandType.SetProgram;
public readonly CommandType CommandType => CommandType.SetProgram;
private TableRef<IProgram> _program;
public void Set(TableRef<IProgram> program)

View file

@ -2,7 +2,7 @@
{
struct SetRasterizerDiscardCommand : IGALCommand, IGALCommand<SetRasterizerDiscardCommand>
{
public CommandType CommandType => CommandType.SetRasterizerDiscard;
public readonly CommandType CommandType => CommandType.SetRasterizerDiscard;
private bool _discard;
public void Set(bool discard)

View file

@ -5,7 +5,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct SetRenderTargetColorMasksCommand : IGALCommand, IGALCommand<SetRenderTargetColorMasksCommand>
{
public CommandType CommandType => CommandType.SetRenderTargetColorMasks;
public readonly CommandType CommandType => CommandType.SetRenderTargetColorMasks;
private SpanRef<uint> _componentMask;
public void Set(SpanRef<uint> componentMask)

View file

@ -2,7 +2,7 @@
{
struct SetRenderTargetScaleCommand : IGALCommand, IGALCommand<SetRenderTargetScaleCommand>
{
public CommandType CommandType => CommandType.SetRenderTargetScale;
public readonly CommandType CommandType => CommandType.SetRenderTargetScale;
private float _scale;
public void Set(float scale)

View file

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

View file

@ -4,7 +4,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct SetScissorsCommand : IGALCommand, IGALCommand<SetScissorsCommand>
{
public CommandType CommandType => CommandType.SetScissor;
public readonly CommandType CommandType => CommandType.SetScissor;
private SpanRef<Rectangle<int>> _scissors;
public void Set(SpanRef<Rectangle<int>> scissors)

View file

@ -2,7 +2,7 @@
{
struct SetStencilTestCommand : IGALCommand, IGALCommand<SetStencilTestCommand>
{
public CommandType CommandType => CommandType.SetStencilTest;
public readonly CommandType CommandType => CommandType.SetStencilTest;
private StencilTestDescriptor _stencilTest;
public void Set(StencilTestDescriptor stencilTest)

View file

@ -5,7 +5,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct SetStorageBuffersCommand : IGALCommand, IGALCommand<SetStorageBuffersCommand>
{
public CommandType CommandType => CommandType.SetStorageBuffers;
public readonly CommandType CommandType => CommandType.SetStorageBuffers;
private SpanRef<BufferAssignment> _buffers;
public void Set(SpanRef<BufferAssignment> buffers)

View file

@ -6,7 +6,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct SetTextureAndSamplerCommand : IGALCommand, IGALCommand<SetTextureAndSamplerCommand>
{
public CommandType CommandType => CommandType.SetTextureAndSampler;
public readonly CommandType CommandType => CommandType.SetTextureAndSampler;
private ShaderStage _stage;
private int _binding;
private TableRef<ITexture> _texture;

View file

@ -5,7 +5,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct SetTransformFeedbackBuffersCommand : IGALCommand, IGALCommand<SetTransformFeedbackBuffersCommand>
{
public CommandType CommandType => CommandType.SetTransformFeedbackBuffers;
public readonly CommandType CommandType => CommandType.SetTransformFeedbackBuffers;
private SpanRef<BufferRange> _buffers;
public void Set(SpanRef<BufferRange> buffers)

View file

@ -5,7 +5,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct SetUniformBuffersCommand : IGALCommand, IGALCommand<SetUniformBuffersCommand>
{
public CommandType CommandType => CommandType.SetUniformBuffers;
public readonly CommandType CommandType => CommandType.SetUniformBuffers;
private SpanRef<BufferAssignment> _buffers;
public void Set(SpanRef<BufferAssignment> buffers)

View file

@ -2,7 +2,7 @@
{
struct SetUserClipDistanceCommand : IGALCommand, IGALCommand<SetUserClipDistanceCommand>
{
public CommandType CommandType => CommandType.SetUserClipDistance;
public readonly CommandType CommandType => CommandType.SetUserClipDistance;
private int _index;
private bool _enableClip;

View file

@ -5,7 +5,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct SetVertexAttribsCommand : IGALCommand, IGALCommand<SetVertexAttribsCommand>
{
public CommandType CommandType => CommandType.SetVertexAttribs;
public readonly CommandType CommandType => CommandType.SetVertexAttribs;
private SpanRef<VertexAttribDescriptor> _vertexAttribs;
public void Set(SpanRef<VertexAttribDescriptor> vertexAttribs)

View file

@ -5,7 +5,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct SetVertexBuffersCommand : IGALCommand, IGALCommand<SetVertexBuffersCommand>
{
public CommandType CommandType => CommandType.SetVertexBuffers;
public readonly CommandType CommandType => CommandType.SetVertexBuffers;
private SpanRef<VertexBufferDescriptor> _vertexBuffers;
public void Set(SpanRef<VertexBufferDescriptor> vertexBuffers)

View file

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

View file

@ -5,7 +5,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Texture
{
struct TextureCopyToBufferCommand : IGALCommand, IGALCommand<TextureCopyToBufferCommand>
{
public CommandType CommandType => CommandType.TextureCopyToBuffer;
public readonly CommandType CommandType => CommandType.TextureCopyToBuffer;
private TableRef<ThreadedTexture> _texture;
private BufferRange _range;
private int _layer;

View file

@ -5,7 +5,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Texture
{
struct TextureCopyToCommand : IGALCommand, IGALCommand<TextureCopyToCommand>
{
public CommandType CommandType => CommandType.TextureCopyTo;
public readonly CommandType CommandType => CommandType.TextureCopyTo;
private TableRef<ThreadedTexture> _texture;
private TableRef<ThreadedTexture> _destination;
private int _firstLayer;

View file

@ -5,7 +5,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Texture
{
struct TextureCopyToScaledCommand : IGALCommand, IGALCommand<TextureCopyToScaledCommand>
{
public CommandType CommandType => CommandType.TextureCopyToScaled;
public readonly CommandType CommandType => CommandType.TextureCopyToScaled;
private TableRef<ThreadedTexture> _texture;
private TableRef<ThreadedTexture> _destination;
private Extents2D _srcRegion;

View file

@ -5,7 +5,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Texture
{
struct TextureCopyToSliceCommand : IGALCommand, IGALCommand<TextureCopyToSliceCommand>
{
public CommandType CommandType => CommandType.TextureCopyToSlice;
public readonly CommandType CommandType => CommandType.TextureCopyToSlice;
private TableRef<ThreadedTexture> _texture;
private TableRef<ThreadedTexture> _destination;
private int _srcLayer;

View file

@ -5,7 +5,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Texture
{
struct TextureCreateViewCommand : IGALCommand, IGALCommand<TextureCreateViewCommand>
{
public CommandType CommandType => CommandType.TextureCreateView;
public readonly CommandType CommandType => CommandType.TextureCreateView;
private TableRef<ThreadedTexture> _texture;
private TableRef<ThreadedTexture> _destination;
private TextureCreateInfo _info;

View file

@ -1,12 +1,11 @@
using Ryujinx.Graphics.GAL.Multithreading.Model;
using Ryujinx.Graphics.GAL.Multithreading.Resources;
using System;
namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Texture
{
struct TextureGetDataCommand : IGALCommand, IGALCommand<TextureGetDataCommand>
{
public CommandType CommandType => CommandType.TextureGetData;
public readonly CommandType CommandType => CommandType.TextureGetData;
private TableRef<ThreadedTexture> _texture;
private TableRef<ResultBox<PinnedSpan<byte>>> _result;

View file

@ -1,12 +1,11 @@
using Ryujinx.Graphics.GAL.Multithreading.Model;
using Ryujinx.Graphics.GAL.Multithreading.Resources;
using System;
namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Texture
{
struct TextureGetDataSliceCommand : IGALCommand, IGALCommand<TextureGetDataSliceCommand>
{
public CommandType CommandType => CommandType.TextureGetDataSlice;
public readonly CommandType CommandType => CommandType.TextureGetDataSlice;
private TableRef<ThreadedTexture> _texture;
private TableRef<ResultBox<PinnedSpan<byte>>> _result;
private int _layer;

View file

@ -5,7 +5,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Texture
{
struct TextureReleaseCommand : IGALCommand, IGALCommand<TextureReleaseCommand>
{
public CommandType CommandType => CommandType.TextureRelease;
public readonly CommandType CommandType => CommandType.TextureRelease;
private TableRef<ThreadedTexture> _texture;
public void Set(TableRef<ThreadedTexture> texture)

View file

@ -6,7 +6,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Texture
{
struct TextureSetDataCommand : IGALCommand, IGALCommand<TextureSetDataCommand>
{
public CommandType CommandType => CommandType.TextureSetData;
public readonly CommandType CommandType => CommandType.TextureSetData;
private TableRef<ThreadedTexture> _texture;
private TableRef<byte[]> _data;

View file

@ -6,7 +6,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Texture
{
struct TextureSetDataSliceCommand : IGALCommand, IGALCommand<TextureSetDataSliceCommand>
{
public CommandType CommandType => CommandType.TextureSetDataSlice;
public readonly CommandType CommandType => CommandType.TextureSetDataSlice;
private TableRef<ThreadedTexture> _texture;
private TableRef<byte[]> _data;
private int _layer;

View file

@ -6,7 +6,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Texture
{
struct TextureSetDataSliceRegionCommand : IGALCommand, IGALCommand<TextureSetDataSliceRegionCommand>
{
public CommandType CommandType => CommandType.TextureSetDataSliceRegion;
public readonly CommandType CommandType => CommandType.TextureSetDataSliceRegion;
private TableRef<ThreadedTexture> _texture;
private TableRef<byte[]> _data;
private int _layer;

View file

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

View file

@ -2,7 +2,7 @@
{
struct TextureBarrierCommand : IGALCommand, IGALCommand<TextureBarrierCommand>
{
public CommandType CommandType => CommandType.TextureBarrier;
public readonly CommandType CommandType => CommandType.TextureBarrier;
public static void Run(ref TextureBarrierCommand command, ThreadedRenderer threaded, IRenderer renderer)
{

View file

@ -2,7 +2,7 @@
{
struct TextureBarrierTiledCommand : IGALCommand, IGALCommand<TextureBarrierTiledCommand>
{
public CommandType CommandType => CommandType.TextureBarrierTiled;
public readonly CommandType CommandType => CommandType.TextureBarrierTiled;
public static void Run(ref TextureBarrierTiledCommand command, ThreadedRenderer threaded, IRenderer renderer)
{

View file

@ -5,7 +5,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct TryHostConditionalRenderingCommand : IGALCommand, IGALCommand<TryHostConditionalRenderingCommand>
{
public CommandType CommandType => CommandType.TryHostConditionalRendering;
public readonly CommandType CommandType => CommandType.TryHostConditionalRendering;
private TableRef<ThreadedCounterEvent> _value;
private ulong _compare;
private bool _isEqual;

View file

@ -5,7 +5,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct TryHostConditionalRenderingFlushCommand : IGALCommand, IGALCommand<TryHostConditionalRenderingFlushCommand>
{
public CommandType CommandType => CommandType.TryHostConditionalRenderingFlush;
public readonly CommandType CommandType => CommandType.TryHostConditionalRenderingFlush;
private TableRef<ThreadedCounterEvent> _value;
private TableRef<ThreadedCounterEvent> _compare;
private bool _isEqual;

View file

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

View file

@ -6,7 +6,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Window
{
struct WindowPresentCommand : IGALCommand, IGALCommand<WindowPresentCommand>
{
public CommandType CommandType => CommandType.WindowPresent;
public readonly CommandType CommandType => CommandType.WindowPresent;
private TableRef<ThreadedTexture> _texture;
private ImageCrop _crop;
private TableRef<Action> _swapBuffersCallback;