From 7c989f88bdab65dfa7783e824a180220ba829bd0 Mon Sep 17 00:00:00 2001 From: TSRBerry <20988865+TSRBerry@users.noreply.github.com> Date: Wed, 28 Jun 2023 20:20:10 +0200 Subject: [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 --- .../Multithreading/Commands/Texture/TextureCopyToBufferCommand.cs | 2 +- .../Multithreading/Commands/Texture/TextureCopyToCommand.cs | 2 +- .../Multithreading/Commands/Texture/TextureCopyToScaledCommand.cs | 2 +- .../Multithreading/Commands/Texture/TextureCopyToSliceCommand.cs | 2 +- .../Multithreading/Commands/Texture/TextureCreateViewCommand.cs | 2 +- .../Multithreading/Commands/Texture/TextureGetDataCommand.cs | 3 +-- .../Multithreading/Commands/Texture/TextureGetDataSliceCommand.cs | 3 +-- .../Multithreading/Commands/Texture/TextureReleaseCommand.cs | 2 +- .../Multithreading/Commands/Texture/TextureSetDataCommand.cs | 2 +- .../Multithreading/Commands/Texture/TextureSetDataSliceCommand.cs | 2 +- .../Commands/Texture/TextureSetDataSliceRegionCommand.cs | 2 +- .../Multithreading/Commands/Texture/TextureSetStorageCommand.cs | 2 +- 12 files changed, 12 insertions(+), 14 deletions(-) (limited to 'src/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture') diff --git a/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureCopyToBufferCommand.cs b/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureCopyToBufferCommand.cs index ac0e07d6..d22cc9b7 100644 --- a/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureCopyToBufferCommand.cs +++ b/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureCopyToBufferCommand.cs @@ -5,7 +5,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Texture { struct TextureCopyToBufferCommand : IGALCommand, IGALCommand { - public CommandType CommandType => CommandType.TextureCopyToBuffer; + public readonly CommandType CommandType => CommandType.TextureCopyToBuffer; private TableRef _texture; private BufferRange _range; private int _layer; diff --git a/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureCopyToCommand.cs b/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureCopyToCommand.cs index 02d0b639..ddbf0e67 100644 --- a/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureCopyToCommand.cs +++ b/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureCopyToCommand.cs @@ -5,7 +5,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Texture { struct TextureCopyToCommand : IGALCommand, IGALCommand { - public CommandType CommandType => CommandType.TextureCopyTo; + public readonly CommandType CommandType => CommandType.TextureCopyTo; private TableRef _texture; private TableRef _destination; private int _firstLayer; diff --git a/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureCopyToScaledCommand.cs b/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureCopyToScaledCommand.cs index 6b83d3f8..b43ffea5 100644 --- a/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureCopyToScaledCommand.cs +++ b/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureCopyToScaledCommand.cs @@ -5,7 +5,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Texture { struct TextureCopyToScaledCommand : IGALCommand, IGALCommand { - public CommandType CommandType => CommandType.TextureCopyToScaled; + public readonly CommandType CommandType => CommandType.TextureCopyToScaled; private TableRef _texture; private TableRef _destination; private Extents2D _srcRegion; diff --git a/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureCopyToSliceCommand.cs b/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureCopyToSliceCommand.cs index 2a340a70..4f5ab36f 100644 --- a/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureCopyToSliceCommand.cs +++ b/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureCopyToSliceCommand.cs @@ -5,7 +5,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Texture { struct TextureCopyToSliceCommand : IGALCommand, IGALCommand { - public CommandType CommandType => CommandType.TextureCopyToSlice; + public readonly CommandType CommandType => CommandType.TextureCopyToSlice; private TableRef _texture; private TableRef _destination; private int _srcLayer; diff --git a/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureCreateViewCommand.cs b/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureCreateViewCommand.cs index 09e9ca2f..9216e968 100644 --- a/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureCreateViewCommand.cs +++ b/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureCreateViewCommand.cs @@ -5,7 +5,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Texture { struct TextureCreateViewCommand : IGALCommand, IGALCommand { - public CommandType CommandType => CommandType.TextureCreateView; + public readonly CommandType CommandType => CommandType.TextureCreateView; private TableRef _texture; private TableRef _destination; private TextureCreateInfo _info; diff --git a/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureGetDataCommand.cs b/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureGetDataCommand.cs index 91320d45..38010467 100644 --- a/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureGetDataCommand.cs +++ b/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureGetDataCommand.cs @@ -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 { - public CommandType CommandType => CommandType.TextureGetData; + public readonly CommandType CommandType => CommandType.TextureGetData; private TableRef _texture; private TableRef>> _result; diff --git a/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureGetDataSliceCommand.cs b/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureGetDataSliceCommand.cs index ec06cc4d..e84cf2d2 100644 --- a/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureGetDataSliceCommand.cs +++ b/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureGetDataSliceCommand.cs @@ -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 { - public CommandType CommandType => CommandType.TextureGetDataSlice; + public readonly CommandType CommandType => CommandType.TextureGetDataSlice; private TableRef _texture; private TableRef>> _result; private int _layer; diff --git a/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureReleaseCommand.cs b/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureReleaseCommand.cs index 61486e09..a9c528ae 100644 --- a/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureReleaseCommand.cs +++ b/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureReleaseCommand.cs @@ -5,7 +5,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Texture { struct TextureReleaseCommand : IGALCommand, IGALCommand { - public CommandType CommandType => CommandType.TextureRelease; + public readonly CommandType CommandType => CommandType.TextureRelease; private TableRef _texture; public void Set(TableRef texture) diff --git a/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureSetDataCommand.cs b/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureSetDataCommand.cs index cfbaffd3..9aa2e4ee 100644 --- a/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureSetDataCommand.cs +++ b/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureSetDataCommand.cs @@ -6,7 +6,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Texture { struct TextureSetDataCommand : IGALCommand, IGALCommand { - public CommandType CommandType => CommandType.TextureSetData; + public readonly CommandType CommandType => CommandType.TextureSetData; private TableRef _texture; private TableRef _data; diff --git a/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureSetDataSliceCommand.cs b/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureSetDataSliceCommand.cs index a7126f61..14fecadf 100644 --- a/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureSetDataSliceCommand.cs +++ b/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureSetDataSliceCommand.cs @@ -6,7 +6,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Texture { struct TextureSetDataSliceCommand : IGALCommand, IGALCommand { - public CommandType CommandType => CommandType.TextureSetDataSlice; + public readonly CommandType CommandType => CommandType.TextureSetDataSlice; private TableRef _texture; private TableRef _data; private int _layer; diff --git a/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureSetDataSliceRegionCommand.cs b/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureSetDataSliceRegionCommand.cs index 4df83e08..4c80d9bc 100644 --- a/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureSetDataSliceRegionCommand.cs +++ b/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureSetDataSliceRegionCommand.cs @@ -6,7 +6,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Texture { struct TextureSetDataSliceRegionCommand : IGALCommand, IGALCommand { - public CommandType CommandType => CommandType.TextureSetDataSliceRegion; + public readonly CommandType CommandType => CommandType.TextureSetDataSliceRegion; private TableRef _texture; private TableRef _data; private int _layer; diff --git a/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureSetStorageCommand.cs b/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureSetStorageCommand.cs index 2a1943a9..fafaa557 100644 --- a/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureSetStorageCommand.cs +++ b/src/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureSetStorageCommand.cs @@ -5,7 +5,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Texture { struct TextureSetStorageCommand : IGALCommand, IGALCommand { - public CommandType CommandType => CommandType.TextureSetStorage; + public readonly CommandType CommandType => CommandType.TextureSetStorage; private TableRef _texture; private BufferRange _storage; -- cgit v1.2.3