diff options
| author | 2018-06-17 23:50:44 -0400 | |
|---|---|---|
| committer | 2018-06-18 01:56:59 -0400 | |
| commit | 61779fa072fea906410eca3e29ba54fe1ee347d3 (patch) | |
| tree | cf52473bbca8d54e6edfddf28d874d8a1e50856b /src/video_core/textures/decoders.cpp | |
| parent | Merge pull request #569 from bunnei/fix-cache (diff) | |
| download | yuzu-61779fa072fea906410eca3e29ba54fe1ee347d3.tar.gz yuzu-61779fa072fea906410eca3e29ba54fe1ee347d3.tar.xz yuzu-61779fa072fea906410eca3e29ba54fe1ee347d3.zip | |
gl_rasterizer: Implement texture format ASTC_2D_4X4.
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 7bf9c4c4b..0db4367f1 100644 --- a/src/video_core/textures/decoders.cpp +++ b/src/video_core/textures/decoders.cpp | |||
| @@ -53,6 +53,7 @@ u32 BytesPerPixel(TextureFormat format) { | |||
| 53 | case TextureFormat::DXT45: | 53 | case TextureFormat::DXT45: |
| 54 | // In this case a 'pixel' actually refers to a 4x4 tile. | 54 | // In this case a 'pixel' actually refers to a 4x4 tile. |
| 55 | return 16; | 55 | return 16; |
| 56 | case TextureFormat::ASTC_2D_4X4: | ||
| 56 | case TextureFormat::A8R8G8B8: | 57 | case TextureFormat::A8R8G8B8: |
| 57 | case TextureFormat::A2B10G10R10: | 58 | case TextureFormat::A2B10G10R10: |
| 58 | case TextureFormat::BF10GF11RF11: | 59 | case TextureFormat::BF10GF11RF11: |
| @@ -94,6 +95,7 @@ std::vector<u8> UnswizzleTexture(VAddr address, TextureFormat format, u32 width, | |||
| 94 | case TextureFormat::R8: | 95 | case TextureFormat::R8: |
| 95 | case TextureFormat::R16_G16_B16_A16: | 96 | case TextureFormat::R16_G16_B16_A16: |
| 96 | case TextureFormat::BF10GF11RF11: | 97 | case TextureFormat::BF10GF11RF11: |
| 98 | case TextureFormat::ASTC_2D_4X4: | ||
| 97 | CopySwizzledData(width, height, bytes_per_pixel, bytes_per_pixel, data, | 99 | CopySwizzledData(width, height, bytes_per_pixel, bytes_per_pixel, data, |
| 98 | unswizzled_data.data(), true, block_height); | 100 | unswizzled_data.data(), true, block_height); |
| 99 | break; | 101 | break; |
| @@ -115,6 +117,7 @@ std::vector<u8> DecodeTexture(const std::vector<u8>& texture_data, TextureFormat | |||
| 115 | case TextureFormat::DXT23: | 117 | case TextureFormat::DXT23: |
| 116 | case TextureFormat::DXT45: | 118 | case TextureFormat::DXT45: |
| 117 | case TextureFormat::DXN1: | 119 | case TextureFormat::DXN1: |
| 120 | case TextureFormat::ASTC_2D_4X4: | ||
| 118 | case TextureFormat::A8R8G8B8: | 121 | case TextureFormat::A8R8G8B8: |
| 119 | case TextureFormat::A2B10G10R10: | 122 | case TextureFormat::A2B10G10R10: |
| 120 | case TextureFormat::A1B5G5R5: | 123 | case TextureFormat::A1B5G5R5: |