From 9becbd7d728fc2002c176dfd9d1d1aae86f86b12 Mon Sep 17 00:00:00 2001 From: TSRBerry <20988865+TSRBerry@users.noreply.github.com> Date: Wed, 28 Jun 2023 08:59:13 +0200 Subject: [Ryujinx.Graphics.Shader] Address dotnet-format issues (#5373) * dotnet format style --severity info Some changes were manually reverted. * Restore a few unused methods and variables * Silence dotnet format IDE0060 warnings * Silence dotnet format IDE0052 warnings * Silence dotnet format IDE0059 warnings * Address or silence dotnet format CA1069 warnings * Address or silence dotnet format CA2211 warnings * Address review comments * Fix formatting for switch expressions * 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 * Format if-blocks correctly * Run dotnet format whitespace after rebase * Run dotnet format style after rebase * Run dotnet format whitespace after rebase * Run dotnet format style after rebase * Run dotnet format after rebase and remove unused usings - analyzers - style - whitespace * Disable 'prefer switch expression' rule * Add comments to disabled warnings * Fix naming rule violation, Convert shader properties to auto-property and convert values to const * Simplify properties and array initialization, Use const when possible, Remove trailing commas * Run dotnet format after rebase * Address IDE0251 warnings * Address a few disabled IDE0060 warnings * Silence IDE0060 in .editorconfig * Run dotnet format after rebase * 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 * Fix naming rule violations * Add trailing commas * Remove unused members and most unnecessary value assignments * Remove more unnecessary assignments * Remove NRE suppressor --- .../Instructions/InstEmitAluHelper.cs | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'src/Ryujinx.Graphics.Shader/Instructions/InstEmitAluHelper.cs') diff --git a/src/Ryujinx.Graphics.Shader/Instructions/InstEmitAluHelper.cs b/src/Ryujinx.Graphics.Shader/Instructions/InstEmitAluHelper.cs index 879075ba..4370560d 100644 --- a/src/Ryujinx.Graphics.Shader/Instructions/InstEmitAluHelper.cs +++ b/src/Ryujinx.Graphics.Shader/Instructions/InstEmitAluHelper.cs @@ -2,7 +2,6 @@ using Ryujinx.Graphics.Shader.Decoders; using Ryujinx.Graphics.Shader.IntermediateRepresentation; using Ryujinx.Graphics.Shader.Translation; using System; - using static Ryujinx.Graphics.Shader.Instructions.InstEmitHelper; using static Ryujinx.Graphics.Shader.IntermediateRepresentation.OperandHelper; @@ -18,7 +17,7 @@ namespace Ryujinx.Graphics.Shader.Instructions IDstFmt.S16 => short.MinValue, IDstFmt.U32 => uint.MinValue, IDstFmt.S32 => int.MinValue, - _ => throw new ArgumentException($"The type \"{type}\" is not a supported integer type.") + _ => throw new ArgumentException($"The type \"{type}\" is not a supported integer type."), }; } @@ -30,7 +29,7 @@ namespace Ryujinx.Graphics.Shader.Instructions IDstFmt.S16 => short.MaxValue, IDstFmt.U32 => uint.MaxValue, IDstFmt.S32 => int.MaxValue, - _ => throw new ArgumentException($"The type \"{type}\" is not a supported integer type.") + _ => throw new ArgumentException($"The type \"{type}\" is not a supported integer type."), }; } @@ -44,7 +43,7 @@ namespace Ryujinx.Graphics.Shader.Instructions ISrcDstFmt.S16 => short.MinValue, ISrcDstFmt.U32 => uint.MinValue, ISrcDstFmt.S32 => int.MinValue, - _ => throw new ArgumentException($"The type \"{type}\" is not a supported integer type.") + _ => throw new ArgumentException($"The type \"{type}\" is not a supported integer type."), }; } @@ -58,7 +57,7 @@ namespace Ryujinx.Graphics.Shader.Instructions ISrcDstFmt.S16 => short.MaxValue, ISrcDstFmt.U32 => uint.MaxValue, ISrcDstFmt.S32 => int.MaxValue, - _ => throw new ArgumentException($"The type \"{type}\" is not a supported integer type.") + _ => throw new ArgumentException($"The type \"{type}\" is not a supported integer type."), }; } @@ -69,7 +68,7 @@ namespace Ryujinx.Graphics.Shader.Instructions BoolOp.And => context.BitwiseAnd(input, pred), BoolOp.Or => context.BitwiseOr(input, pred), BoolOp.Xor => context.BitwiseExclusiveOr(input, pred), - _ => input + _ => input, }; } @@ -89,7 +88,7 @@ namespace Ryujinx.Graphics.Shader.Instructions VectorSelect.S8B3 => SignExtendTo32(context, context.ShiftRightU32(src, Const(24)), 8), VectorSelect.S16H0 => SignExtendTo32(context, context.ShiftRightU32(src, Const(0)), 16), VectorSelect.S16H1 => SignExtendTo32(context, context.ShiftRightU32(src, Const(16)), 16), - _ => src + _ => src, }; } @@ -134,7 +133,7 @@ namespace Ryujinx.Graphics.Shader.Instructions } context.Copy(GetZF(), context.FPCompareEqual(dest, zero, fpType)); - context.Copy(GetNF(), context.FPCompareLess (dest, zero, fpType)); + context.Copy(GetNF(), context.FPCompareLess(dest, zero, fpType)); } } @@ -157,4 +156,4 @@ namespace Ryujinx.Graphics.Shader.Instructions return result; } } -} \ No newline at end of file +} -- cgit v1.2.3