diff options
author | TSRBerry <20988865+TSRBerry@users.noreply.github.com> | 2023-07-02 02:47:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-02 02:47:54 +0200 |
commit | 3b46bb73f781a011705ecbc8a1d3207dfb145829 (patch) | |
tree | 1d5d2714c7001775b512bc14ce91a1ebbfc808df /src/Ryujinx.Graphics.Gpu/Engine/Threed/Blender/UcodeAssembler.cs | |
parent | 2457cfc9118a6ebb6008945c919edfd8b46af5e7 (diff) |
[Ryujinx.Graphics.Gpu] Address dotnet-format issues (#5367)1.1.951
* 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 IDE0060 warnings
* Silence dotnet format IDE0052 warnings
* Address dotnet format CA1816 warnings
* Address or silence dotnet format CA1069 warnings
* Address or silence dotnet format CA2211 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
* Format if-blocks correctly
* Run dotnet format whitespace after rebase
* Run dotnet format style after rebase
* Another rebase, another dotnet format run
* 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
* Remove a few unused parameters
* Replace MmeShadowScratch with Array256<uint>
* Simplify properties and array initialization, Use const when possible, Remove trailing commas
* Start working on disabled warnings
* Fix and silence a few dotnet-format warnings again
* Run dotnet format after rebase
* Address IDE0251 warnings
* Silence IDE0060 in .editorconfig
* Revert "Simplify properties and array initialization, Use const when possible, Remove trailing commas"
This reverts commit 9462e4136c0a2100dc28b20cf9542e06790aa67e.
* dotnet format whitespace after rebase
* First pass of dotnet format
* Add unsafe dotnet format changes
* Fix typos
* Add trailing commas
* Disable formatting for FormatTable
* Address review feedback
Diffstat (limited to 'src/Ryujinx.Graphics.Gpu/Engine/Threed/Blender/UcodeAssembler.cs')
-rw-r--r-- | src/Ryujinx.Graphics.Gpu/Engine/Threed/Blender/UcodeAssembler.cs | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/src/Ryujinx.Graphics.Gpu/Engine/Threed/Blender/UcodeAssembler.cs b/src/Ryujinx.Graphics.Gpu/Engine/Threed/Blender/UcodeAssembler.cs index f854787e..8e020906 100644 --- a/src/Ryujinx.Graphics.Gpu/Engine/Threed/Blender/UcodeAssembler.cs +++ b/src/Ryujinx.Graphics.Gpu/Engine/Threed/Blender/UcodeAssembler.cs @@ -14,7 +14,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed.Blender Max = 3, Rcp = 4, Add = 5, - Sub = 6 + Sub = 6, } /// <summary> @@ -29,7 +29,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed.Blender LT = 4, LE = 5, GT = 6, - GE = 7 + GE = 7, } /// <summary> @@ -49,7 +49,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed.Blender Temp1 = 0xa, Temp2 = 0xb, PBR = 0xc, - ConstantRGB = 0xd + ConstantRGB = 0xd, } /// <summary> @@ -64,7 +64,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed.Blender Temp0 = 4, Temp1 = 5, Temp2 = 6, - PBR = 7 + PBR = 7, } /// <summary> @@ -75,7 +75,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed.Blender Temp0 = 0, Temp1 = 1, Temp2 = 2, - PBR = 3 + PBR = 3, } /// <summary> @@ -88,7 +88,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed.Blender RRR = 2, GGG = 3, BBB = 4, - RToA = 5 + RToA = 5, } /// <summary> @@ -99,13 +99,13 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed.Blender RGB = 0, R = 1, G = 2, - B = 3 + B = 3, } /// <summary> /// Floating-point RGB color values. /// </summary> - struct RgbFloat + readonly struct RgbFloat { /// <summary> /// Red component value. @@ -139,24 +139,24 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed.Blender /// <summary> /// Blend microcode destination operand, including swizzle, write mask and condition code update flag. /// </summary> - struct Dest + readonly struct Dest { - public static Dest Temp0 => new Dest(OpDst.Temp0, Swizzle.RGB, WriteMask.RGB, false); - public static Dest Temp1 => new Dest(OpDst.Temp1, Swizzle.RGB, WriteMask.RGB, false); - public static Dest Temp2 => new Dest(OpDst.Temp2, Swizzle.RGB, WriteMask.RGB, false); - public static Dest PBR => new Dest(OpDst.PBR, Swizzle.RGB, WriteMask.RGB, false); + public static Dest Temp0 => new(OpDst.Temp0, Swizzle.RGB, WriteMask.RGB, false); + public static Dest Temp1 => new(OpDst.Temp1, Swizzle.RGB, WriteMask.RGB, false); + public static Dest Temp2 => new(OpDst.Temp2, Swizzle.RGB, WriteMask.RGB, false); + public static Dest PBR => new(OpDst.PBR, Swizzle.RGB, WriteMask.RGB, false); - public Dest GBR => new Dest(Dst, Swizzle.GBR, WriteMask, WriteCC); - public Dest RRR => new Dest(Dst, Swizzle.RRR, WriteMask, WriteCC); - public Dest GGG => new Dest(Dst, Swizzle.GGG, WriteMask, WriteCC); - public Dest BBB => new Dest(Dst, Swizzle.BBB, WriteMask, WriteCC); - public Dest RToA => new Dest(Dst, Swizzle.RToA, WriteMask, WriteCC); + public Dest GBR => new(Dst, Swizzle.GBR, WriteMask, WriteCC); + public Dest RRR => new(Dst, Swizzle.RRR, WriteMask, WriteCC); + public Dest GGG => new(Dst, Swizzle.GGG, WriteMask, WriteCC); + public Dest BBB => new(Dst, Swizzle.BBB, WriteMask, WriteCC); + public Dest RToA => new(Dst, Swizzle.RToA, WriteMask, WriteCC); - public Dest R => new Dest(Dst, Swizzle, WriteMask.R, WriteCC); - public Dest G => new Dest(Dst, Swizzle, WriteMask.G, WriteCC); - public Dest B => new Dest(Dst, Swizzle, WriteMask.B, WriteCC); + public Dest R => new(Dst, Swizzle, WriteMask.R, WriteCC); + public Dest G => new(Dst, Swizzle, WriteMask.G, WriteCC); + public Dest B => new(Dst, Swizzle, WriteMask.B, WriteCC); - public Dest CC => new Dest(Dst, Swizzle, WriteMask, true); + public Dest CC => new(Dst, Swizzle, WriteMask, true); public OpDst Dst { get; } public Swizzle Swizzle { get; } @@ -182,7 +182,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed.Blender /// <summary> /// Blend microcode operaiton. /// </summary> - struct UcodeOp + readonly struct UcodeOp { public readonly uint Word; @@ -292,14 +292,14 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed.Blender _constantIndex = index; } - public uint[] GetCode() + public readonly uint[] GetCode() { return _code?.ToArray(); } - public RgbFloat[] GetConstants() + public readonly RgbFloat[] GetConstants() { return _constants; } } -}
\ No newline at end of file +} |