diff options
| author | 2018-05-27 09:02:05 -0500 | |
|---|---|---|
| committer | 2018-05-27 09:02:05 -0500 | |
| commit | 7ddc872b529192fd822c1d759ccfac2398b6ca2a (patch) | |
| tree | 5f839f0f1337359b2a3bb66c2e9d0d8b3d268ff0 /src/video_core/textures | |
| parent | Add & correct miscellaneous things (#470) (diff) | |
| download | yuzu-7ddc872b529192fd822c1d759ccfac2398b6ca2a.tar.gz yuzu-7ddc872b529192fd822c1d759ccfac2398b6ca2a.tar.xz yuzu-7ddc872b529192fd822c1d759ccfac2398b6ca2a.zip | |
GPU: Implemented the A1B5G5R5 texture format (0x14)
Diffstat (limited to 'src/video_core/textures')
| -rw-r--r-- | src/video_core/textures/decoders.cpp | 3 | ||||
| -rw-r--r-- | src/video_core/textures/texture.h | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/video_core/textures/decoders.cpp b/src/video_core/textures/decoders.cpp index 8b39b2bdf..ceb760e0f 100644 --- a/src/video_core/textures/decoders.cpp +++ b/src/video_core/textures/decoders.cpp | |||
| @@ -55,6 +55,7 @@ u32 BytesPerPixel(TextureFormat format) { | |||
| 55 | case TextureFormat::A8R8G8B8: | 55 | case TextureFormat::A8R8G8B8: |
| 56 | case TextureFormat::A2B10G10R10: | 56 | case TextureFormat::A2B10G10R10: |
| 57 | return 4; | 57 | return 4; |
| 58 | case TextureFormat::A1B5G5R5: | ||
| 58 | case TextureFormat::B5G6R5: | 59 | case TextureFormat::B5G6R5: |
| 59 | return 2; | 60 | return 2; |
| 60 | default: | 61 | default: |
| @@ -80,6 +81,7 @@ std::vector<u8> UnswizzleTexture(VAddr address, TextureFormat format, u32 width, | |||
| 80 | break; | 81 | break; |
| 81 | case TextureFormat::A8R8G8B8: | 82 | case TextureFormat::A8R8G8B8: |
| 82 | case TextureFormat::A2B10G10R10: | 83 | case TextureFormat::A2B10G10R10: |
| 84 | case TextureFormat::A1B5G5R5: | ||
| 83 | case TextureFormat::B5G6R5: | 85 | case TextureFormat::B5G6R5: |
| 84 | CopySwizzledData(width, height, bytes_per_pixel, bytes_per_pixel, data, | 86 | CopySwizzledData(width, height, bytes_per_pixel, bytes_per_pixel, data, |
| 85 | unswizzled_data.data(), true, block_height); | 87 | unswizzled_data.data(), true, block_height); |
| @@ -103,6 +105,7 @@ std::vector<u8> DecodeTexture(const std::vector<u8>& texture_data, TextureFormat | |||
| 103 | case TextureFormat::DXT45: | 105 | case TextureFormat::DXT45: |
| 104 | case TextureFormat::A8R8G8B8: | 106 | case TextureFormat::A8R8G8B8: |
| 105 | case TextureFormat::A2B10G10R10: | 107 | case TextureFormat::A2B10G10R10: |
| 108 | case TextureFormat::A1B5G5R5: | ||
| 106 | case TextureFormat::B5G6R5: | 109 | case TextureFormat::B5G6R5: |
| 107 | // TODO(Subv): For the time being just forward the same data without any decoding. | 110 | // TODO(Subv): For the time being just forward the same data without any decoding. |
| 108 | rgba_data = texture_data; | 111 | rgba_data = texture_data; |
diff --git a/src/video_core/textures/texture.h b/src/video_core/textures/texture.h index dc004d361..b33e9bab3 100644 --- a/src/video_core/textures/texture.h +++ b/src/video_core/textures/texture.h | |||
| @@ -16,6 +16,7 @@ namespace Texture { | |||
| 16 | enum class TextureFormat : u32 { | 16 | enum class TextureFormat : u32 { |
| 17 | A8R8G8B8 = 0x8, | 17 | A8R8G8B8 = 0x8, |
| 18 | A2B10G10R10 = 0x9, | 18 | A2B10G10R10 = 0x9, |
| 19 | A1B5G5R5 = 0x14, | ||
| 19 | B5G6R5 = 0x15, | 20 | B5G6R5 = 0x15, |
| 20 | DXT1 = 0x24, | 21 | DXT1 = 0x24, |
| 21 | DXT23 = 0x25, | 22 | DXT23 = 0x25, |