From b9aa3966c00b4bb3ff0292dc28ed53ad26cf284b Mon Sep 17 00:00:00 2001 From: gdkchan Date: Sun, 8 Apr 2018 16:17:35 -0300 Subject: Merge shader branch, adding support for GLSL decompilation, a macro interpreter, and a rewrite of the GPU code. --- Ryujinx.Graphics/Gal/Texture/TextureDecoder.cs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Ryujinx.Graphics/Gal/Texture/TextureDecoder.cs (limited to 'Ryujinx.Graphics/Gal/Texture/TextureDecoder.cs') diff --git a/Ryujinx.Graphics/Gal/Texture/TextureDecoder.cs b/Ryujinx.Graphics/Gal/Texture/TextureDecoder.cs new file mode 100644 index 00000000..4e50db51 --- /dev/null +++ b/Ryujinx.Graphics/Gal/Texture/TextureDecoder.cs @@ -0,0 +1,19 @@ +using System; + +namespace Ryujinx.Graphics.Gal.Texture +{ + static class TextureDecoder + { + public static byte[] Decode(GalTexture Texture) + { + switch (Texture.Format) + { + case GalTextureFormat.BC1: return BCn.DecodeBC1(Texture, 0); + case GalTextureFormat.BC2: return BCn.DecodeBC2(Texture, 0); + case GalTextureFormat.BC3: return BCn.DecodeBC3(Texture, 0); + } + + throw new NotImplementedException(Texture.Format.ToString()); + } + } +} \ No newline at end of file -- cgit v1.2.3