1
0
Fork 0
mirror of https://github.com/Ryujinx/Ryujinx.git synced 2024-10-01 12:30:00 +02:00

Prefer jagged arrays over multidimensional (#5562)

* fix CA1814

* Update .editorconfig

removing .editorconfig rule
This commit is contained in:
Marco Carvalho 2023-08-16 18:24:44 -03:00 committed by GitHub
parent 17354d59d1
commit 64079c034c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);