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/ThreedClassState.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/ThreedClassState.cs')
-rw-r--r-- | src/Ryujinx.Graphics.Gpu/Engine/Threed/ThreedClassState.cs | 170 |
1 files changed, 85 insertions, 85 deletions
diff --git a/src/Ryujinx.Graphics.Gpu/Engine/Threed/ThreedClassState.cs b/src/Ryujinx.Graphics.Gpu/Engine/Threed/ThreedClassState.cs index beda2dbf..f2997678 100644 --- a/src/Ryujinx.Graphics.Gpu/Engine/Threed/ThreedClassState.cs +++ b/src/Ryujinx.Graphics.Gpu/Engine/Threed/ThreedClassState.cs @@ -18,7 +18,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed TessellationControl, TessellationEvaluation, Geometry, - Fragment + Fragment, } /// <summary> @@ -26,7 +26,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed /// </summary> struct TessMode { -#pragma warning disable CS0649 +#pragma warning disable CS0649 // Field is never assigned to public uint Packed; #pragma warning restore CS0649 @@ -34,7 +34,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed /// Unpacks the tessellation abstract patch type. /// </summary> /// <returns>Abtract patch type</returns> - public TessPatchType UnpackPatchType() + public readonly TessPatchType UnpackPatchType() { return (TessPatchType)(Packed & 3); } @@ -43,7 +43,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed /// Unpacks the spacing between tessellated vertices of the patch. /// </summary> /// <returns>Spacing between tessellated vertices</returns> - public TessSpacing UnpackSpacing() + public readonly TessSpacing UnpackSpacing() { return (TessSpacing)((Packed >> 4) & 3); } @@ -52,7 +52,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed /// Unpacks the primitive winding order. /// </summary> /// <returns>True if clockwise, false if counter-clockwise</returns> - public bool UnpackCw() + public readonly bool UnpackCw() { return (Packed & (1 << 8)) != 0; } @@ -63,7 +63,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed /// </summary> struct TfBufferState { -#pragma warning disable CS0649 +#pragma warning disable CS0649 // Field is never assigned to public Boolean32 Enable; public GpuVa Address; public int Size; @@ -79,7 +79,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed /// </summary> struct TfState { -#pragma warning disable CS0649 +#pragma warning disable CS0649 // Field is never assigned to public int BufferIndex; public int VaryingsCount; public int Stride; @@ -92,7 +92,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed /// </summary> struct RtColorState { -#pragma warning disable CS0649 +#pragma warning disable CS0649 // Field is never assigned to public GpuVa Address; public int WidthOrStride; public int Height; @@ -116,7 +116,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed /// </summary> struct ViewportTransform { -#pragma warning disable CS0649 +#pragma warning disable CS0649 // Field is never assigned to public float ScaleX; public float ScaleY; public float ScaleZ; @@ -131,7 +131,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed /// Unpacks viewport swizzle of the position X component. /// </summary> /// <returns>Swizzle enum value</returns> - public ViewportSwizzle UnpackSwizzleX() + public readonly ViewportSwizzle UnpackSwizzleX() { return (ViewportSwizzle)(Swizzle & 7); } @@ -140,7 +140,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed /// Unpacks viewport swizzle of the position Y component. /// </summary> /// <returns>Swizzle enum value</returns> - public ViewportSwizzle UnpackSwizzleY() + public readonly ViewportSwizzle UnpackSwizzleY() { return (ViewportSwizzle)((Swizzle >> 4) & 7); } @@ -149,7 +149,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed /// Unpacks viewport swizzle of the position Z component. /// </summary> /// <returns>Swizzle enum value</returns> - public ViewportSwizzle UnpackSwizzleZ() + public readonly ViewportSwizzle UnpackSwizzleZ() { return (ViewportSwizzle)((Swizzle >> 8) & 7); } @@ -158,7 +158,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed /// Unpacks viewport swizzle of the position W component. /// </summary> /// <returns>Swizzle enum value</returns> - public ViewportSwizzle UnpackSwizzleW() + public readonly ViewportSwizzle UnpackSwizzleW() { return (ViewportSwizzle)((Swizzle >> 12) & 7); } @@ -169,7 +169,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed /// </summary> struct ViewportExtents { -#pragma warning disable CS0649 +#pragma warning disable CS0649 // Field is never assigned to public ushort X; public ushort Width; public ushort Y; @@ -184,7 +184,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed /// </summary> struct VertexBufferDrawState { -#pragma warning disable CS0649 +#pragma warning disable CS0649 // Field is never assigned to public int First; public int Count; #pragma warning restore CS0649 @@ -195,7 +195,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed /// </summary> struct ClearColors { -#pragma warning disable CS0649 +#pragma warning disable CS0649 // Field is never assigned to public float Red; public float Green; public float Blue; @@ -208,7 +208,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed /// </summary> struct DepthBiasState { -#pragma warning disable CS0649 +#pragma warning disable CS0649 // Field is never assigned to public Boolean32 PointEnable; public Boolean32 LineEnable; public Boolean32 FillEnable; @@ -223,7 +223,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed Disabled = 0, EnableRGB = 1, EnableAlpha = 2, - EnableRGBA = 3 + EnableRGBA = 3, } /// <summary> @@ -231,7 +231,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed /// </summary> struct ScissorState { -#pragma warning disable CS0649 +#pragma warning disable CS0649 // Field is never assigned to public Boolean32 Enable; public ushort X1; public ushort X2; @@ -246,7 +246,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed /// </summary> struct StencilBackMasks { -#pragma warning disable CS0649 +#pragma warning disable CS0649 // Field is never assigned to public int FuncRef; public int Mask; public int FuncMask; @@ -258,7 +258,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed /// </summary> struct RtDepthStencilState { -#pragma warning disable CS0649 +#pragma warning disable CS0649 // Field is never assigned to public GpuVa Address; public ZetaFormat Format; public MemoryLayout MemoryLayout; @@ -271,7 +271,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed /// </summary> struct ScreenScissorState { -#pragma warning disable CS0649 +#pragma warning disable CS0649 // Field is never assigned to public ushort X; public ushort Width; public ushort Y; @@ -297,7 +297,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed Size16 = 0x1b, Size8 = 0x1d, Rgb10A2 = 0x30, - Rg11B10 = 0x31 + Rg11B10 = 0x31, } /// <summary> @@ -311,7 +311,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed Uint = 4, Uscaled = 5, Sscaled = 6, - Float = 7 + Float = 7, } /// <summary> @@ -319,7 +319,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed /// </summary> struct VertexAttribState { -#pragma warning disable CS0649 +#pragma warning disable CS0649 // Field is never assigned to public uint Attribute; #pragma warning restore CS0649 @@ -327,7 +327,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed /// Unpacks the index of the vertex buffer this attribute belongs to. /// </summary> /// <returns>Vertex buffer index</returns> - public int UnpackBufferIndex() + public readonly int UnpackBufferIndex() { return (int)(Attribute & 0x1f); } @@ -336,7 +336,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed /// Unpacks the attribute constant flag. /// </summary> /// <returns>True if the attribute is constant, false otherwise</returns> - public bool UnpackIsConstant() + public readonly bool UnpackIsConstant() { return (Attribute & 0x40) != 0; } @@ -345,7 +345,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed /// Unpacks the offset, in bytes, of the attribute on the vertex buffer. /// </summary> /// <returns>Attribute offset in bytes</returns> - public int UnpackOffset() + public readonly int UnpackOffset() { return (int)((Attribute >> 7) & 0x3fff); } @@ -354,7 +354,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed /// Unpacks the Maxwell attribute format integer. /// </summary> /// <returns>Attribute format integer</returns> - public uint UnpackFormat() + public readonly uint UnpackFormat() { return Attribute & 0x3fe00000; } @@ -363,7 +363,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed /// Unpacks the Maxwell attribute size. /// </summary> /// <returns>Attribute size</returns> - public VertexAttribSize UnpackSize() + public readonly VertexAttribSize UnpackSize() { return (VertexAttribSize)((Attribute >> 21) & 0x3f); } @@ -372,7 +372,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed /// Unpacks the Maxwell attribute component type. /// </summary> /// <returns>Attribute component type</returns> - public VertexAttribType UnpackType() + public readonly VertexAttribType UnpackType() { return (VertexAttribType)((Attribute >> 27) & 7); } @@ -383,7 +383,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed /// </summary> struct RtControl { -#pragma warning disable CS0649 +#pragma warning disable CS0649 // Field is never assigned to public uint Packed; #pragma warning restore CS0649 @@ -391,7 +391,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed /// Unpacks the number of active draw buffers. /// </summary> /// <returns>Number of active draw buffers</returns> - public int UnpackCount() + public readonly int UnpackCount() { return (int)(Packed & 0xf); } @@ -401,7 +401,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed /// </summary> /// <param name="index">Index of the draw buffer</param> /// <returns>Attachment index</returns> - public int UnpackPermutationIndex(int index) + public readonly int UnpackPermutationIndex(int index) { return (int)((Packed >> (4 + index * 3)) & 7); } @@ -412,7 +412,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed /// </summary> struct Size3D { -#pragma warning disable CS0649 +#pragma warning disable CS0649 // Field is never assigned to public int Width; public int Height; public int Depth; @@ -424,7 +424,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed /// </summary> struct StencilTestState { -#pragma warning disable CS0649 +#pragma warning disable CS0649 // Field is never assigned to public Boolean32 Enable; public StencilOp FrontSFail; public StencilOp FrontDpFail; @@ -443,7 +443,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed enum YControl { NegateY = 1 << 0, - TriangleRastFlip = 1 << 4 + TriangleRastFlip = 1 << 4, } /// <summary> @@ -451,7 +451,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed /// </summary> struct RgbHalf { -#pragma warning disable CS0649 +#pragma warning disable CS0649 // Field is never assigned to public uint R; public uint G; public uint B; @@ -462,7 +462,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed /// Unpacks the red color component as a 16-bit float value. /// </summary> /// <returns>The component value</returns> - public Half UnpackR() + public readonly Half UnpackR() { ushort value = (ushort)R; return Unsafe.As<ushort, Half>(ref value); @@ -472,7 +472,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed /// Unpacks the green color component as a 16-bit float value. /// </summary> /// <returns>The component value</returns> - public Half UnpackG() + public readonly Half UnpackG() { ushort value = (ushort)G; return Unsafe.As<ushort, Half>(ref value); @@ -482,7 +482,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed /// Unpacks the blue color component as a 16-bit float value. /// </summary> /// <returns>The component value</returns> - public Half UnpackB() + public readonly Half UnpackB() { ushort value = (ushort)B; return Unsafe.As<ushort, Half>(ref value); @@ -498,7 +498,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed Always, ResultNonZero, Equal, - NotEqual + NotEqual, } /// <summary> @@ -506,7 +506,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed /// </summary> struct PoolState { -#pragma warning disable CS0649 +#pragma warning disable CS0649 // Field is never assigned to public GpuVa Address; public int MaximumId; #pragma warning restore CS0649 @@ -517,7 +517,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed /// </summary> struct StencilBackTestState { -#pragma warning disable CS0649 +#pragma warning disable CS0649 // Field is never assigned to public Boolean32 TwoSided; public StencilOp BackSFail; public StencilOp BackDpFail; @@ -531,7 +531,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed /// </summary> struct PrimitiveRestartState { -#pragma warning disable CS0649 +#pragma warning disable CS0649 // Field is never assigned to public Boolean32 Enable; public int Index; #pragma warning restore CS0649 @@ -543,7 +543,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed /// </summary> struct IndexBufferState { -#pragma warning disable CS0649 +#pragma warning disable CS0649 // Field is never assigned to public GpuVa Address; public GpuVa EndAddress; public IndexType Type; @@ -556,7 +556,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed /// </summary> struct FaceState { -#pragma warning disable CS0649 +#pragma warning disable CS0649 // Field is never assigned to public Boolean32 CullEnable; public FrontFace FrontFace; public Face CullFace; @@ -570,7 +570,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed enum ViewVolumeClipControl { ForceDepthRangeZeroToOne = 1 << 0, - DepthClampDisabled = 1 << 11 + DepthClampDisabled = 1 << 11, } /// <summary> @@ -578,7 +578,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed /// </summary> struct LogicalOpState { -#pragma warning disable CS0649 +#pragma warning disable CS0649 // Field is never assigned to public Boolean32 Enable; public LogicalOp LogicalOp; #pragma warning restore CS0649 @@ -590,7 +590,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed /// </summary> struct RtColorMask { -#pragma warning disable CS0649 +#pragma warning disable CS0649 // Field is never assigned to public uint Packed; #pragma warning restore CS0649 @@ -598,7 +598,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed /// Unpacks red channel enable. /// </summary> /// <returns>True to write the new red channel color, false to keep the old value</returns> - public bool UnpackRed() + public readonly bool UnpackRed() { return (Packed & 0x1) != 0; } @@ -607,7 +607,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed /// Unpacks green channel enable. /// </summary> /// <returns>True to write the new green channel color, false to keep the old value</returns> - public bool UnpackGreen() + public readonly bool UnpackGreen() { return (Packed & 0x10) != 0; } @@ -616,7 +616,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed /// Unpacks blue channel enable. /// </summary> /// <returns>True to write the new blue channel color, false to keep the old value</returns> - public bool UnpackBlue() + public readonly bool UnpackBlue() { return (Packed & 0x100) != 0; } @@ -625,7 +625,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed /// Unpacks alpha channel enable. /// </summary> /// <returns>True to write the new alpha channel color, false to keep the old value</returns> - public bool UnpackAlpha() + public readonly bool UnpackAlpha() { return (Packed & 0x1000) != 0; } @@ -636,7 +636,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed /// </summary> struct VertexBufferState { -#pragma warning disable CS0649 +#pragma warning disable CS0649 // Field is never assigned to public uint Control; public GpuVa Address; public int Divisor; @@ -646,7 +646,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed /// Vertex buffer stride, defined as the number of bytes occupied by each vertex in memory. /// </summary> /// <returns>Vertex buffer stride</returns> - public int UnpackStride() + public readonly int UnpackStride() { return (int)(Control & 0xfff); } @@ -655,7 +655,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed /// Vertex buffer enable. /// </summary> /// <returns>True if the vertex buffer is enabled, false otherwise</returns> - public bool UnpackEnable() + public readonly bool UnpackEnable() { return (Control & (1 << 12)) != 0; } @@ -666,7 +666,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed /// </summary> struct BlendStateCommon { -#pragma warning disable CS0649 +#pragma warning disable CS0649 // Field is never assigned to public Boolean32 SeparateAlpha; public BlendOp ColorOp; public BlendFactor ColorSrcFactor; @@ -683,7 +683,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed /// </summary> struct BlendState { -#pragma warning disable CS0649 +#pragma warning disable CS0649 // Field is never assigned to public Boolean32 SeparateAlpha; public BlendOp ColorOp; public BlendFactor ColorSrcFactor; @@ -700,7 +700,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed /// </summary> struct ShaderState { -#pragma warning disable CS0649 +#pragma warning disable CS0649 // Field is never assigned to public uint Control; public uint Offset; public uint Unknown0x8; @@ -724,7 +724,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed /// Must be ignored for vertex shaders, those are always enabled. /// </summary> /// <returns>True if the stage is enabled, false otherwise</returns> - public bool UnpackEnable() + public readonly bool UnpackEnable() { return (Control & 1) != 0; } @@ -735,7 +735,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed /// </summary> struct UniformBufferState { -#pragma warning disable CS0649 +#pragma warning disable CS0649 // Field is never assigned to public int Size; public GpuVa Address; public int Offset; @@ -744,30 +744,30 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed unsafe struct ThreedClassState : IShadowState { -#pragma warning disable CS0649 +#pragma warning disable CS0649 // Field is never assigned to public uint SetObject; - public int SetObjectClassId => (int)(SetObject & 0xFFFF); - public int SetObjectEngineId => (int)((SetObject >> 16) & 0x1F); + public readonly int SetObjectClassId => (int)(SetObject & 0xFFFF); + public readonly int SetObjectEngineId => (int)((SetObject >> 16) & 0x1F); public fixed uint Reserved04[63]; public uint NoOperation; public uint SetNotifyA; - public int SetNotifyAAddressUpper => (int)(SetNotifyA & 0xFF); + public readonly int SetNotifyAAddressUpper => (int)(SetNotifyA & 0xFF); public uint SetNotifyB; public uint Notify; - public NotifyType NotifyType => (NotifyType)(Notify); + public readonly NotifyType NotifyType => (NotifyType)(Notify); public uint WaitForIdle; public uint LoadMmeInstructionRamPointer; public uint LoadMmeInstructionRam; public uint LoadMmeStartAddressRamPointer; public uint LoadMmeStartAddressRam; public uint SetMmeShadowRamControl; - public SetMmeShadowRamControlMode SetMmeShadowRamControlMode => (SetMmeShadowRamControlMode)(SetMmeShadowRamControl & 0x3); + public readonly SetMmeShadowRamControlMode SetMmeShadowRamControlMode => (SetMmeShadowRamControlMode)(SetMmeShadowRamControl & 0x3); public fixed uint Reserved128[2]; public uint SetGlobalRenderEnableA; - public int SetGlobalRenderEnableAOffsetUpper => (int)(SetGlobalRenderEnableA & 0xFF); + public readonly int SetGlobalRenderEnableAOffsetUpper => (int)(SetGlobalRenderEnableA & 0xFF); public uint SetGlobalRenderEnableB; public uint SetGlobalRenderEnableC; - public int SetGlobalRenderEnableCMode => (int)(SetGlobalRenderEnableC & 0x7); + public readonly int SetGlobalRenderEnableCMode => (int)(SetGlobalRenderEnableC & 0x7); public uint SendGoIdle; public uint PmTrigger; public uint PmTriggerWfi; @@ -778,30 +778,30 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed public uint LineLengthIn; public uint LineCount; public uint OffsetOutUpper; - public int OffsetOutUpperValue => (int)(OffsetOutUpper & 0xFF); + public readonly int OffsetOutUpperValue => (int)(OffsetOutUpper & 0xFF); public uint OffsetOut; public uint PitchOut; public uint SetDstBlockSize; - public SetDstBlockSizeWidth SetDstBlockSizeWidth => (SetDstBlockSizeWidth)(SetDstBlockSize & 0xF); - public SetDstBlockSizeHeight SetDstBlockSizeHeight => (SetDstBlockSizeHeight)((SetDstBlockSize >> 4) & 0xF); - public SetDstBlockSizeDepth SetDstBlockSizeDepth => (SetDstBlockSizeDepth)((SetDstBlockSize >> 8) & 0xF); + public readonly SetDstBlockSizeWidth SetDstBlockSizeWidth => (SetDstBlockSizeWidth)(SetDstBlockSize & 0xF); + public readonly SetDstBlockSizeHeight SetDstBlockSizeHeight => (SetDstBlockSizeHeight)((SetDstBlockSize >> 4) & 0xF); + public readonly SetDstBlockSizeDepth SetDstBlockSizeDepth => (SetDstBlockSizeDepth)((SetDstBlockSize >> 8) & 0xF); public uint SetDstWidth; public uint SetDstHeight; public uint SetDstDepth; public uint SetDstLayer; public uint SetDstOriginBytesX; - public int SetDstOriginBytesXV => (int)(SetDstOriginBytesX & 0xFFFFF); + public readonly int SetDstOriginBytesXV => (int)(SetDstOriginBytesX & 0xFFFFF); public uint SetDstOriginSamplesY; - public int SetDstOriginSamplesYV => (int)(SetDstOriginSamplesY & 0xFFFF); + public readonly int SetDstOriginSamplesYV => (int)(SetDstOriginSamplesY & 0xFFFF); public uint LaunchDma; - public LaunchDmaDstMemoryLayout LaunchDmaDstMemoryLayout => (LaunchDmaDstMemoryLayout)(LaunchDma & 0x1); - public LaunchDmaCompletionType LaunchDmaCompletionType => (LaunchDmaCompletionType)((LaunchDma >> 4) & 0x3); - public LaunchDmaInterruptType LaunchDmaInterruptType => (LaunchDmaInterruptType)((LaunchDma >> 8) & 0x3); - public LaunchDmaSemaphoreStructSize LaunchDmaSemaphoreStructSize => (LaunchDmaSemaphoreStructSize)((LaunchDma >> 12) & 0x1); - public bool LaunchDmaReductionEnable => (LaunchDma & 0x2) != 0; - public LaunchDmaReductionOp LaunchDmaReductionOp => (LaunchDmaReductionOp)((LaunchDma >> 13) & 0x7); - public LaunchDmaReductionFormat LaunchDmaReductionFormat => (LaunchDmaReductionFormat)((LaunchDma >> 2) & 0x3); - public bool LaunchDmaSysmembarDisable => (LaunchDma & 0x40) != 0; + public readonly LaunchDmaDstMemoryLayout LaunchDmaDstMemoryLayout => (LaunchDmaDstMemoryLayout)(LaunchDma & 0x1); + public readonly LaunchDmaCompletionType LaunchDmaCompletionType => (LaunchDmaCompletionType)((LaunchDma >> 4) & 0x3); + public readonly LaunchDmaInterruptType LaunchDmaInterruptType => (LaunchDmaInterruptType)((LaunchDma >> 8) & 0x3); + public readonly LaunchDmaSemaphoreStructSize LaunchDmaSemaphoreStructSize => (LaunchDmaSemaphoreStructSize)((LaunchDma >> 12) & 0x1); + public readonly bool LaunchDmaReductionEnable => (LaunchDma & 0x2) != 0; + public readonly LaunchDmaReductionOp LaunchDmaReductionOp => (LaunchDmaReductionOp)((LaunchDma >> 13) & 0x7); + public readonly LaunchDmaReductionFormat LaunchDmaReductionFormat => (LaunchDmaReductionFormat)((LaunchDma >> 2) & 0x3); + public readonly bool LaunchDmaSysmembarDisable => (LaunchDma & 0x40) != 0; public uint LoadInlineData; public fixed uint Reserved1B8[22]; public Boolean32 EarlyZForce; @@ -1042,7 +1042,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed public fixed uint Reserved260C[125]; public Array4<Array32<uint>> TfVaryingLocations; public fixed uint Reserved2A00[640]; - public MmeShadowScratch SetMmeShadowScratch; + public Array256<uint> SetMmeShadowScratch; #pragma warning restore CS0649 } } |