diff --git a/Ryujinx.Graphics.Texture/Astc/AstcDecoder.cs b/Ryujinx.Graphics.Texture/Astc/AstcDecoder.cs index 202df1ab66..cb23afcb44 100644 --- a/Ryujinx.Graphics.Texture/Astc/AstcDecoder.cs +++ b/Ryujinx.Graphics.Texture/Astc/AstcDecoder.cs @@ -45,6 +45,7 @@ namespace Ryujinx.Graphics.Texture.Astc Levels = new AstcLevel[levels]; TotalBlockCount = 0; + int currentInputBlock = 0; int currentOutputOffset = 0; @@ -224,6 +225,7 @@ namespace Ryujinx.Graphics.Texture.Astc } decoded = output; + return decoder.Success; } @@ -282,6 +284,7 @@ namespace Ryujinx.Graphics.Texture.Astc Enumerable.Range(0, decoder.TotalBlockCount).AsParallel().ForAll(x => decoder.ProcessBlock(x)); decoded = output; + return decoder.Success; } @@ -337,6 +340,7 @@ namespace Ryujinx.Graphics.Texture.Astc // Determine partitions, partition index, and color endpoint modes int planeIndices; int partitionIndex; + Span colorEndpointMode = stackalloc uint[4]; BitStream128 colorEndpointStream = new BitStream128(); @@ -1360,6 +1364,7 @@ namespace Ryujinx.Graphics.Texture.Astc if ((modeBits & 0xF) == 0) { texelParams.Error = true; + return; } diff --git a/Ryujinx.Graphics.Texture/Astc/BitStream128.cs b/Ryujinx.Graphics.Texture/Astc/BitStream128.cs index a949cbe634..3bf9769f53 100644 --- a/Ryujinx.Graphics.Texture/Astc/BitStream128.cs +++ b/Ryujinx.Graphics.Texture/Astc/BitStream128.cs @@ -19,7 +19,10 @@ namespace Ryujinx.Graphics.Texture.Astc { Debug.Assert(bitCount < 32); - if (bitCount == 0) return 0; + if (bitCount == 0) + { + return 0; + } int mask = (1 << bitCount) - 1; int value = _data.As() & mask; @@ -31,6 +34,7 @@ namespace Ryujinx.Graphics.Texture.Astc span[1] >>= bitCount; BitsLeft -= bitCount; + return value; } diff --git a/Ryujinx.Graphics.Texture/Astc/Bits.cs b/Ryujinx.Graphics.Texture/Astc/Bits.cs index d3e6963b60..b140a20a02 100644 --- a/Ryujinx.Graphics.Texture/Astc/Bits.cs +++ b/Ryujinx.Graphics.Texture/Astc/Bits.cs @@ -49,6 +49,7 @@ retValue |= tempValue >> comp; resLength += numberBits; } + return retValue; }