diff options
author | TSRBerry <20988865+TSRBerry@users.noreply.github.com> | 2023-06-28 20:20:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-28 20:20:10 +0200 |
commit | 7c989f88bdab65dfa7783e824a180220ba829bd0 (patch) | |
tree | 57ca5fa398d1fc2d97f7f1e14fcf74cfb6907fc3 /src/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer | |
parent | 16fa98370472f843ebdae5addbb00e26899ebe55 (diff) |
[Ryujinx.Graphics.GAL] Address dotnet-format issues (#5366)1.1.941
* 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
Diffstat (limited to 'src/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer')
13 files changed, 13 insertions, 13 deletions
diff --git a/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/ActionCommand.cs b/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/ActionCommand.cs index 41987da1..309a9cd0 100644 --- a/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/ActionCommand.cs +++ b/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/ActionCommand.cs @@ -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) diff --git a/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/CreateBufferAccessCommand.cs b/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/CreateBufferAccessCommand.cs index ece98b70..5efa0a7a 100644 --- a/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/CreateBufferAccessCommand.cs +++ b/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/CreateBufferAccessCommand.cs @@ -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; diff --git a/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/CreateBufferCommand.cs b/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/CreateBufferCommand.cs index b36d8bbe..214b3589 100644 --- a/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/CreateBufferCommand.cs +++ b/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/CreateBufferCommand.cs @@ -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; diff --git a/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/CreateHostBufferCommand.cs b/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/CreateHostBufferCommand.cs index e25f8468..1036e997 100644 --- a/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/CreateHostBufferCommand.cs +++ b/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/CreateHostBufferCommand.cs @@ -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; diff --git a/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/CreateProgramCommand.cs b/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/CreateProgramCommand.cs index 19563e12..b0d24b99 100644 --- a/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/CreateProgramCommand.cs +++ b/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/CreateProgramCommand.cs @@ -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) diff --git a/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/CreateSamplerCommand.cs b/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/CreateSamplerCommand.cs index 6ab862d4..76188268 100644 --- a/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/CreateSamplerCommand.cs +++ b/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/CreateSamplerCommand.cs @@ -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; diff --git a/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/CreateSyncCommand.cs b/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/CreateSyncCommand.cs index 32afb051..138a4591 100644 --- a/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/CreateSyncCommand.cs +++ b/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/CreateSyncCommand.cs @@ -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; diff --git a/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/CreateTextureCommand.cs b/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/CreateTextureCommand.cs index 0347ded4..f52db30a 100644 --- a/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/CreateTextureCommand.cs +++ b/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/CreateTextureCommand.cs @@ -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; diff --git a/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/GetCapabilitiesCommand.cs b/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/GetCapabilitiesCommand.cs index 4111dcfd..ade13ddf 100644 --- a/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/GetCapabilitiesCommand.cs +++ b/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/GetCapabilitiesCommand.cs @@ -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) diff --git a/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/PreFrameCommand.cs b/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/PreFrameCommand.cs index 820908f3..cf26194b 100644 --- a/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/PreFrameCommand.cs +++ b/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/PreFrameCommand.cs @@ -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) { diff --git a/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/ReportCounterCommand.cs b/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/ReportCounterCommand.cs index 4b0210cb..2a373f5b 100644 --- a/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/ReportCounterCommand.cs +++ b/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/ReportCounterCommand.cs @@ -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; diff --git a/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/ResetCounterCommand.cs b/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/ResetCounterCommand.cs index 3d796041..a20a6ca2 100644 --- a/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/ResetCounterCommand.cs +++ b/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/ResetCounterCommand.cs @@ -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) diff --git a/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/UpdateCountersCommand.cs b/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/UpdateCountersCommand.cs index c7076c0e..e04304c1 100644 --- a/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/UpdateCountersCommand.cs +++ b/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Renderer/UpdateCountersCommand.cs @@ -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) { |