aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Graphics.Gpu/Engine/Threed/Blender/UcodeAssembler.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Ryujinx.Graphics.Gpu/Engine/Threed/Blender/UcodeAssembler.cs')
-rw-r--r--src/Ryujinx.Graphics.Gpu/Engine/Threed/Blender/UcodeAssembler.cs52
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
+}