diff options
| author | 2018-08-09 12:57:13 -0400 | |
|---|---|---|
| committer | 2018-08-09 12:57:13 -0400 | |
| commit | 5cb6eceecfe1b631f8da5b41559076c8a880e26a (patch) | |
| tree | f8f850ed708a247d35aa60ea7a25b979b616465c /src/video_core/textures/decoders.cpp | |
| parent | Merge pull request #988 from lioncash/color (diff) | |
| download | yuzu-5cb6eceecfe1b631f8da5b41559076c8a880e26a.tar.gz yuzu-5cb6eceecfe1b631f8da5b41559076c8a880e26a.tar.xz yuzu-5cb6eceecfe1b631f8da5b41559076c8a880e26a.zip | |
Implement BC5/DXN2 (#996)
- Used by Kirby Star Allies.
Diffstat (limited to 'src/video_core/textures/decoders.cpp')
| -rw-r--r-- | src/video_core/textures/decoders.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/video_core/textures/decoders.cpp b/src/video_core/textures/decoders.cpp index 65db84ad3..7ea66584c 100644 --- a/src/video_core/textures/decoders.cpp +++ b/src/video_core/textures/decoders.cpp | |||
| @@ -54,6 +54,7 @@ u32 BytesPerPixel(TextureFormat format) { | |||
| 54 | return 8; | 54 | return 8; |
| 55 | case TextureFormat::DXT23: | 55 | case TextureFormat::DXT23: |
| 56 | case TextureFormat::DXT45: | 56 | case TextureFormat::DXT45: |
| 57 | case TextureFormat::DXN2: | ||
| 57 | case TextureFormat::BC7U: | 58 | case TextureFormat::BC7U: |
| 58 | // In this case a 'pixel' actually refers to a 4x4 tile. | 59 | // In this case a 'pixel' actually refers to a 4x4 tile. |
| 59 | return 16; | 60 | return 16; |
| @@ -113,6 +114,7 @@ std::vector<u8> UnswizzleTexture(VAddr address, TextureFormat format, u32 width, | |||
| 113 | case TextureFormat::DXT23: | 114 | case TextureFormat::DXT23: |
| 114 | case TextureFormat::DXT45: | 115 | case TextureFormat::DXT45: |
| 115 | case TextureFormat::DXN1: | 116 | case TextureFormat::DXN1: |
| 117 | case TextureFormat::DXN2: | ||
| 116 | case TextureFormat::BC7U: | 118 | case TextureFormat::BC7U: |
| 117 | // In the DXT and DXN formats, each 4x4 tile is swizzled instead of just individual pixel | 119 | // In the DXT and DXN formats, each 4x4 tile is swizzled instead of just individual pixel |
| 118 | // values. | 120 | // values. |
| @@ -179,6 +181,7 @@ std::vector<u8> DecodeTexture(const std::vector<u8>& texture_data, TextureFormat | |||
| 179 | case TextureFormat::DXT23: | 181 | case TextureFormat::DXT23: |
| 180 | case TextureFormat::DXT45: | 182 | case TextureFormat::DXT45: |
| 181 | case TextureFormat::DXN1: | 183 | case TextureFormat::DXN1: |
| 184 | case TextureFormat::DXN2: | ||
| 182 | case TextureFormat::BC7U: | 185 | case TextureFormat::BC7U: |
| 183 | case TextureFormat::ASTC_2D_4X4: | 186 | case TextureFormat::ASTC_2D_4X4: |
| 184 | case TextureFormat::A8R8G8B8: | 187 | case TextureFormat::A8R8G8B8: |