From 64079c034c1c3a18133542d6ac745490149d8043 Mon Sep 17 00:00:00 2001 From: Marco Carvalho Date: Wed, 16 Aug 2023 18:24:44 -0300 Subject: [PATCH] Prefer jagged arrays over multidimensional (#5562) * fix CA1814 * Update .editorconfig removing .editorconfig rule --- .../Instructions/InstEmitTexture.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Ryujinx.Graphics.Shader/Instructions/InstEmitTexture.cs b/src/Ryujinx.Graphics.Shader/Instructions/InstEmitTexture.cs index 1b2673abf5..bbac8038a9 100644 --- a/src/Ryujinx.Graphics.Shader/Instructions/InstEmitTexture.cs +++ b/src/Ryujinx.Graphics.Shader/Instructions/InstEmitTexture.cs @@ -10,10 +10,10 @@ namespace Ryujinx.Graphics.Shader.Instructions { static partial class InstEmit { - private static readonly int[,] _maskLut = new int[,] + private static readonly int[][] _maskLut = new int[][] { - { 0b0001, 0b0010, 0b0100, 0b1000, 0b0011, 0b1001, 0b1010, 0b1100 }, - { 0b0111, 0b1011, 0b1101, 0b1110, 0b1111, 0b0000, 0b0000, 0b0000 }, + new int[] { 0b0001, 0b0010, 0b0100, 0b1000, 0b0011, 0b1001, 0b1010, 0b1100 }, + new int[] { 0b0111, 0b1011, 0b1101, 0b1110, 0b1111, 0b0000, 0b0000, 0b0000 }, }; public const bool Sample1DAs2D = true; @@ -605,7 +605,7 @@ namespace Ryujinx.Graphics.Shader.Instructions Operand[] rd1 = new Operand[2] { ConstF(0), ConstF(0) }; int handle = imm; - int componentMask = _maskLut[dest2 == RegisterConsts.RegisterZeroIndex ? 0 : 1, writeMask]; + int componentMask = _maskLut[dest2 == RegisterConsts.RegisterZeroIndex ? 0 : 1][writeMask]; int componentsCount = BitOperations.PopCount((uint)componentMask);