diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2018-04-08 16:17:35 -0300 |
|---|---|---|
| committer | gdkchan <gab.dark.100@gmail.com> | 2018-04-08 16:41:38 -0300 |
| commit | b9aa3966c00b4bb3ff0292dc28ed53ad26cf284b (patch) | |
| tree | cd2ab3d65c61ac6c6ceb312116e5d138868a3e18 /Ryujinx.Graphics/Gal/Texture/TextureDecoder.cs | |
| parent | 7acd0e01226d64d05b2675f6ae07507039a31835 (diff) | |
Merge shader branch, adding support for GLSL decompilation, a macro
interpreter, and a rewrite of the GPU code.
Diffstat (limited to 'Ryujinx.Graphics/Gal/Texture/TextureDecoder.cs')
| -rw-r--r-- | Ryujinx.Graphics/Gal/Texture/TextureDecoder.cs | 19 |
1 files changed, 19 insertions, 0 deletions
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 |
