aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Graphics.Texture
diff options
context:
space:
mode:
Diffstat (limited to 'src/Ryujinx.Graphics.Texture')
-rw-r--r--src/Ryujinx.Graphics.Texture/Astc/AstcDecoder.cs4
-rw-r--r--src/Ryujinx.Graphics.Texture/Astc/IntegerEncoded.cs8
-rw-r--r--src/Ryujinx.Graphics.Texture/ETC2Decoder.cs6
-rw-r--r--src/Ryujinx.Graphics.Texture/Encoders/BC7Encoder.cs4
-rw-r--r--src/Ryujinx.Graphics.Texture/Encoders/EncodeMode.cs2
-rw-r--r--src/Ryujinx.Graphics.Texture/LayoutConverter.cs8
-rw-r--r--src/Ryujinx.Graphics.Texture/Utils/BC67Tables.cs22
-rw-r--r--src/Ryujinx.Graphics.Texture/Utils/BC67Utils.cs2
-rw-r--r--src/Ryujinx.Graphics.Texture/Utils/RgbaColor8.cs2
9 files changed, 29 insertions, 29 deletions
diff --git a/src/Ryujinx.Graphics.Texture/Astc/AstcDecoder.cs b/src/Ryujinx.Graphics.Texture/Astc/AstcDecoder.cs
index 6f633e4a..1f781d2f 100644
--- a/src/Ryujinx.Graphics.Texture/Astc/AstcDecoder.cs
+++ b/src/Ryujinx.Graphics.Texture/Astc/AstcDecoder.cs
@@ -889,7 +889,7 @@ namespace Ryujinx.Graphics.Texture.Astc
0 => 0,
1 => 32,
2 => 63,
- _ => 0
+ _ => 0,
};
break;
@@ -942,7 +942,7 @@ namespace Ryujinx.Graphics.Texture.Astc
2 => 32,
3 => 47,
4 => 63,
- _ => 0
+ _ => 0,
};
break;
diff --git a/src/Ryujinx.Graphics.Texture/Astc/IntegerEncoded.cs b/src/Ryujinx.Graphics.Texture/Astc/IntegerEncoded.cs
index 56e78cc3..361140dd 100644
--- a/src/Ryujinx.Graphics.Texture/Astc/IntegerEncoded.cs
+++ b/src/Ryujinx.Graphics.Texture/Astc/IntegerEncoded.cs
@@ -12,7 +12,7 @@ namespace Ryujinx.Graphics.Texture.Astc
{
JustBits,
Quint,
- Trit
+ Trit,
}
readonly EIntegerEncoding _encoding;
@@ -162,7 +162,7 @@ namespace Ryujinx.Graphics.Texture.Astc
IntegerEncoded intEncoded = new(EIntegerEncoding.Quint, numberBitsPerValue)
{
BitValue = m[i],
- QuintValue = encodings[i]
+ QuintValue = encodings[i],
};
listIntegerEncoded.Add(ref intEncoded);
@@ -309,7 +309,7 @@ namespace Ryujinx.Graphics.Texture.Astc
2, 1, 1, 1, 2, 1, 1, 2, 1, 2, 0, 2, 1, 1, 2,
1, 2, 1, 1, 2, 2, 2, 1, 1, 2, 2, 1, 2, 1, 2,
0, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 1, 2, 2, 2
+ 2, 1, 2, 2, 2,
};
private static ReadOnlySpan<byte> QuintEncodings => new byte[]
@@ -339,7 +339,7 @@ namespace Ryujinx.Graphics.Texture.Astc
0, 1, 4, 1, 1, 4, 0, 2, 3, 1, 2, 3, 2, 2, 3,
3, 2, 3, 4, 2, 3, 2, 4, 3, 0, 2, 4, 1, 2, 4,
0, 3, 3, 1, 3, 3, 2, 3, 3, 3, 3, 3, 4, 3, 3,
- 3, 4, 3, 0, 3, 4, 1, 3, 4
+ 3, 4, 3, 0, 3, 4, 1, 3, 4,
};
}
}
diff --git a/src/Ryujinx.Graphics.Texture/ETC2Decoder.cs b/src/Ryujinx.Graphics.Texture/ETC2Decoder.cs
index 21ff4be4..57f2e98d 100644
--- a/src/Ryujinx.Graphics.Texture/ETC2Decoder.cs
+++ b/src/Ryujinx.Graphics.Texture/ETC2Decoder.cs
@@ -21,12 +21,12 @@ namespace Ryujinx.Graphics.Texture
new int[] { 18, 60, -18, -60 },
new int[] { 24, 80, -24, -80 },
new int[] { 33, 106, -33, -106 },
- new int[] { 47, 183, -47, -183 }
+ new int[] { 47, 183, -47, -183 },
};
private static readonly int[] _etc2Lut =
{
- 3, 6, 11, 16, 23, 32, 41, 64
+ 3, 6, 11, 16, 23, 32, 41, 64,
};
private static readonly int[][] _etc2AlphaLut =
@@ -46,7 +46,7 @@ namespace Ryujinx.Graphics.Texture
new int[] { -3, -4, -7, -10, 2, 3, 6, 9 },
new int[] { -1, -2, -3, -10, 0, 1, 2, 9 },
new int[] { -4, -6, -8, -9, 3, 5, 7, 8 },
- new int[] { -3, -5, -7, -9, 2, 4, 6, 8 }
+ new int[] { -3, -5, -7, -9, 2, 4, 6, 8 },
};
public static byte[] DecodeRgb(ReadOnlySpan<byte> data, int width, int height, int depth, int levels, int layers)
diff --git a/src/Ryujinx.Graphics.Texture/Encoders/BC7Encoder.cs b/src/Ryujinx.Graphics.Texture/Encoders/BC7Encoder.cs
index d0d1666a..21aa225a 100644
--- a/src/Ryujinx.Graphics.Texture/Encoders/BC7Encoder.cs
+++ b/src/Ryujinx.Graphics.Texture/Encoders/BC7Encoder.cs
@@ -59,7 +59,7 @@ namespace Ryujinx.Graphics.Texture.Encoders
private static readonly int[] _mostFrequentPartitions = new int[]
{
- 0, 13, 2, 1, 15, 14, 10, 23
+ 0, 13, 2, 1, 15, 14, 10, 23,
};
private static Block CompressBlock(ReadOnlySpan<byte> data, int x, int y, int width, int height, bool fastMode)
@@ -233,7 +233,7 @@ namespace Ryujinx.Graphics.Texture.Encoders
1 => new RgbaColor8(255, 0, 0, 0).ToUInt32(),
2 => new RgbaColor8(0, 255, 0, 0).ToUInt32(),
3 => new RgbaColor8(0, 0, 255, 0).ToUInt32(),
- _ => new RgbaColor8(0, 0, 0, 255).ToUInt32()
+ _ => new RgbaColor8(0, 0, 0, 255).ToUInt32(),
};
}
else
diff --git a/src/Ryujinx.Graphics.Texture/Encoders/EncodeMode.cs b/src/Ryujinx.Graphics.Texture/Encoders/EncodeMode.cs
index 5734d301..8db3b3c0 100644
--- a/src/Ryujinx.Graphics.Texture/Encoders/EncodeMode.cs
+++ b/src/Ryujinx.Graphics.Texture/Encoders/EncodeMode.cs
@@ -5,6 +5,6 @@
Fast,
Exhaustive,
ModeMask = 0xff,
- Multithreaded = 1 << 8
+ Multithreaded = 1 << 8,
}
}
diff --git a/src/Ryujinx.Graphics.Texture/LayoutConverter.cs b/src/Ryujinx.Graphics.Texture/LayoutConverter.cs
index 0f7c304e..d9a666c3 100644
--- a/src/Ryujinx.Graphics.Texture/LayoutConverter.cs
+++ b/src/Ryujinx.Graphics.Texture/LayoutConverter.cs
@@ -89,7 +89,7 @@ namespace Ryujinx.Graphics.Texture
8 => Convert<ulong>(dst, data),
12 => Convert<Bpp12Pixel>(dst, data),
16 => Convert<Vector128<byte>>(dst, data),
- _ => throw new NotSupportedException($"Unable to convert ${bytesPerPixel} bpp pixel format.")
+ _ => throw new NotSupportedException($"Unable to convert ${bytesPerPixel} bpp pixel format."),
};
}
@@ -240,7 +240,7 @@ namespace Ryujinx.Graphics.Texture
8 => Convert<ulong>(output, data),
12 => Convert<Bpp12Pixel>(output, data),
16 => Convert<Vector128<byte>>(output, data),
- _ => throw new NotSupportedException($"Unable to convert ${bytesPerPixel} bpp pixel format.")
+ _ => throw new NotSupportedException($"Unable to convert ${bytesPerPixel} bpp pixel format."),
};
}
return output;
@@ -359,7 +359,7 @@ namespace Ryujinx.Graphics.Texture
8 => Convert<ulong>(dst, data),
12 => Convert<Bpp12Pixel>(dst, data),
16 => Convert<Vector128<byte>>(dst, data),
- _ => throw new NotSupportedException($"Unable to convert ${bytesPerPixel} bpp pixel format.")
+ _ => throw new NotSupportedException($"Unable to convert ${bytesPerPixel} bpp pixel format."),
};
}
@@ -504,7 +504,7 @@ namespace Ryujinx.Graphics.Texture
8 => Convert<ulong>(output, data),
12 => Convert<Bpp12Pixel>(output, data),
16 => Convert<Vector128<byte>>(output, data),
- _ => throw new NotSupportedException($"Unable to convert ${bytesPerPixel} bpp pixel format.")
+ _ => throw new NotSupportedException($"Unable to convert ${bytesPerPixel} bpp pixel format."),
};
}
diff --git a/src/Ryujinx.Graphics.Texture/Utils/BC67Tables.cs b/src/Ryujinx.Graphics.Texture/Utils/BC67Tables.cs
index d890652c..f1745d23 100644
--- a/src/Ryujinx.Graphics.Texture/Utils/BC67Tables.cs
+++ b/src/Ryujinx.Graphics.Texture/Utils/BC67Tables.cs
@@ -11,21 +11,21 @@
new BC7ModeInfo(1, 0, 0, 2, 1, 2, 3, 5, 6),
new BC7ModeInfo(1, 0, 0, 2, 0, 2, 2, 7, 8),
new BC7ModeInfo(1, 0, 2, 0, 0, 4, 0, 7, 7),
- new BC7ModeInfo(2, 6, 4, 0, 0, 2, 0, 5, 5)
+ new BC7ModeInfo(2, 6, 4, 0, 0, 2, 0, 5, 5),
};
public static readonly byte[][] Weights =
{
new byte[] { 0, 21, 43, 64 },
new byte[] { 0, 9, 18, 27, 37, 46, 55, 64 },
- new byte[] { 0, 4, 9, 13, 17, 21, 26, 30, 34, 38, 43, 47, 51, 55, 60, 64 }
+ new byte[] { 0, 4, 9, 13, 17, 21, 26, 30, 34, 38, 43, 47, 51, 55, 60, 64 },
};
public static readonly byte[][] InverseWeights =
{
new byte[] { 64, 43, 21, 0 },
new byte[] { 64, 55, 46, 37, 27, 18, 9, 0 },
- new byte[] { 64, 60, 55, 51, 47, 43, 38, 34, 30, 26, 21, 17, 13, 9, 4, 0 }
+ new byte[] { 64, 60, 55, 51, 47, 43, 38, 34, 30, 26, 21, 17, 13, 9, 4, 0 },
};
public static readonly byte[][][] FixUpIndices = new byte[3][][]
@@ -47,7 +47,7 @@
new byte[] { 0, 0, 0 }, new byte[] { 0, 0, 0 }, new byte[] { 0, 0, 0 }, new byte[] { 0, 0, 0 },
new byte[] { 0, 0, 0 }, new byte[] { 0, 0, 0 }, new byte[] { 0, 0, 0 }, new byte[] { 0, 0, 0 },
new byte[] { 0, 0, 0 }, new byte[] { 0, 0, 0 }, new byte[] { 0, 0, 0 }, new byte[] { 0, 0, 0 },
- new byte[] { 0, 0, 0 }, new byte[] { 0, 0, 0 }, new byte[] { 0, 0, 0 }, new byte[] { 0, 0, 0 }
+ new byte[] { 0, 0, 0 }, new byte[] { 0, 0, 0 }, new byte[] { 0, 0, 0 }, new byte[] { 0, 0, 0 },
},
new byte[64][]
{
@@ -66,7 +66,7 @@
new byte[] { 0, 6, 0 }, new byte[] { 0, 2, 0 }, new byte[] { 0, 6, 0 }, new byte[] { 0, 8, 0 },
new byte[] { 0, 15, 0 }, new byte[] { 0, 15, 0 }, new byte[] { 0, 2, 0 }, new byte[] { 0, 2, 0 },
new byte[] { 0, 15, 0 }, new byte[] { 0, 15, 0 }, new byte[] { 0, 15, 0 }, new byte[] { 0, 15, 0 },
- new byte[] { 0, 15, 0 }, new byte[] { 0, 2, 0 }, new byte[] { 0, 2, 0 }, new byte[] { 0, 15, 0 }
+ new byte[] { 0, 15, 0 }, new byte[] { 0, 2, 0 }, new byte[] { 0, 2, 0 }, new byte[] { 0, 15, 0 },
},
new byte[64][]
{
@@ -85,8 +85,8 @@
new byte[] { 0, 3, 15 }, new byte[] { 0, 15, 3 }, new byte[] { 0, 5, 15 }, new byte[] { 0, 5, 15 },
new byte[] { 0, 5, 15 }, new byte[] { 0, 8, 15 }, new byte[] { 0, 5, 15 }, new byte[] { 0, 10, 15 },
new byte[] { 0, 5, 15 }, new byte[] { 0, 10, 15 }, new byte[] { 0, 8, 15 }, new byte[] { 0, 13, 15 },
- new byte[] { 0, 15, 3 }, new byte[] { 0, 12, 15 }, new byte[] { 0, 3, 15 }, new byte[] { 0, 3, 8 }
- }
+ new byte[] { 0, 15, 3 }, new byte[] { 0, 12, 15 }, new byte[] { 0, 3, 15 }, new byte[] { 0, 3, 8 },
+ },
};
public static readonly byte[][][] PartitionTable = new byte[3][][]
@@ -156,7 +156,7 @@
new byte[16] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, // 60
new byte[16] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, // 61
new byte[16] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, // 62
- new byte[16] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } // 63
+ new byte[16] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, // 63
},
new byte[64][]
{
@@ -223,7 +223,7 @@
new byte[16] { 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1 }, // 60
new byte[16] { 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0 }, // 61
new byte[16] { 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0 }, // 62
- new byte[16] { 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1 } // 63
+ new byte[16] { 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1 }, // 63
},
new byte[64][]
{
@@ -290,8 +290,8 @@
new byte[16] { 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 1 }, // 60
new byte[16] { 0, 2, 2, 2, 1, 2, 2, 2, 0, 2, 2, 2, 1, 2, 2, 2 }, // 61
new byte[16] { 0, 1, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 }, // 62
- new byte[16] { 0, 1, 1, 1, 2, 0, 1, 1, 2, 2, 0, 1, 2, 2, 2, 0 } // 63
- }
+ new byte[16] { 0, 1, 1, 1, 2, 0, 1, 1, 2, 2, 0, 1, 2, 2, 2, 0 }, // 63
+ },
};
}
}
diff --git a/src/Ryujinx.Graphics.Texture/Utils/BC67Utils.cs b/src/Ryujinx.Graphics.Texture/Utils/BC67Utils.cs
index 3f69cb4c..0916cc2c 100644
--- a/src/Ryujinx.Graphics.Texture/Utils/BC67Utils.cs
+++ b/src/Ryujinx.Graphics.Texture/Utils/BC67Utils.cs
@@ -1199,7 +1199,7 @@ namespace Ryujinx.Graphics.Texture.Utils
RgbaColor32 weightV = new(colorWeight)
{
- A = alphaWeight
+ A = alphaWeight,
};
RgbaColor32 invWeightV = new RgbaColor32(64) - weightV;
diff --git a/src/Ryujinx.Graphics.Texture/Utils/RgbaColor8.cs b/src/Ryujinx.Graphics.Texture/Utils/RgbaColor8.cs
index 401bec38..eced3d75 100644
--- a/src/Ryujinx.Graphics.Texture/Utils/RgbaColor8.cs
+++ b/src/Ryujinx.Graphics.Texture/Utils/RgbaColor8.cs
@@ -77,7 +77,7 @@ namespace Ryujinx.Graphics.Texture.Utils
1 => G,
2 => B,
3 => A,
- _ => throw new ArgumentOutOfRangeException(nameof(index))
+ _ => throw new ArgumentOutOfRangeException(nameof(index)),
};
}
}