Fix ~3500 analyser issues

See merge request ryubing/ryujinx!44
This commit is contained in:
MrKev
2025-05-30 17:08:34 -05:00
committed by LotP
parent 417df486b1
commit 361d0c5632
622 changed files with 3080 additions and 2652 deletions

View File

@@ -480,6 +480,7 @@ namespace Ryujinx.Graphics.Texture.Astc
{
Debug.Assert(colorEndpointMode[i] < 16);
}
Debug.Assert(bitStream.BitsLeft == texelParams.GetPackedBitSize());
// Decode both color data and texel weight data
@@ -1032,7 +1033,6 @@ namespace Ryujinx.Graphics.Texture.Astc
break;
}
case 1:
{
Span<uint> val = ReadUintColorValues(2, colorValues, ref colorValuesPosition);
@@ -1295,7 +1295,6 @@ namespace Ryujinx.Graphics.Texture.Astc
break;
}
case 4:
{
c = 22;
@@ -1389,6 +1388,7 @@ namespace Ryujinx.Graphics.Texture.Astc
default:
throw new AstcDecoderException("Unsupported quint encoding for color values.");
}
break;
}
}
@@ -1574,7 +1574,7 @@ namespace Ryujinx.Graphics.Texture.Astc
r |= (modeBits & 0xC) >> 1;
}
Debug.Assert(2 <= r && r <= 7);
Debug.Assert(r is >= 2 and <= 7);
// Determine width & height
switch (layout)

View File

@@ -52,6 +52,7 @@ namespace Ryujinx.Graphics.Texture.Astc
comp = numberBits - newShift;
numberBits = newShift;
}
retValue <<= numberBits;
retValue |= tempValue >> comp;
resLength += numberBits;

View File

@@ -52,6 +52,7 @@ namespace Ryujinx.Graphics.Texture.Astc
{
totalBits += (numberVals * 7 + 2) / 3;
}
return totalBits;
}