diff options
| author | 2018-05-29 23:42:55 -0400 | |
|---|---|---|
| committer | 2018-05-29 23:42:55 -0400 | |
| commit | c8e1383fa9303c5e8d4c4c001d61b1d7f0e880dc (patch) | |
| tree | 7367df539beae496ecc4c7175f644d977e6a1a86 /src/video_core/textures/decoders.cpp | |
| parent | Merge pull request #480 from mailwl/bcat (diff) | |
| parent | GPU: Implemented the R8 texture format (0x1D) (diff) | |
| download | yuzu-c8e1383fa9303c5e8d4c4c001d61b1d7f0e880dc.tar.gz yuzu-c8e1383fa9303c5e8d4c4c001d61b1d7f0e880dc.tar.xz yuzu-c8e1383fa9303c5e8d4c4c001d61b1d7f0e880dc.zip | |
Merge pull request #482 from Subv/r8
GPU: Implemented the R8 texture format (0x1D)
Diffstat (limited to 'src/video_core/textures/decoders.cpp')
| -rw-r--r-- | src/video_core/textures/decoders.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/video_core/textures/decoders.cpp b/src/video_core/textures/decoders.cpp index ceb760e0f..9d7b73b73 100644 --- a/src/video_core/textures/decoders.cpp +++ b/src/video_core/textures/decoders.cpp | |||
| @@ -58,6 +58,8 @@ u32 BytesPerPixel(TextureFormat format) { | |||
| 58 | case TextureFormat::A1B5G5R5: | 58 | case TextureFormat::A1B5G5R5: |
| 59 | case TextureFormat::B5G6R5: | 59 | case TextureFormat::B5G6R5: |
| 60 | return 2; | 60 | return 2; |
| 61 | case TextureFormat::R8: | ||
| 62 | return 1; | ||
| 61 | default: | 63 | default: |
| 62 | UNIMPLEMENTED_MSG("Format not implemented"); | 64 | UNIMPLEMENTED_MSG("Format not implemented"); |
| 63 | break; | 65 | break; |
| @@ -83,6 +85,7 @@ std::vector<u8> UnswizzleTexture(VAddr address, TextureFormat format, u32 width, | |||
| 83 | case TextureFormat::A2B10G10R10: | 85 | case TextureFormat::A2B10G10R10: |
| 84 | case TextureFormat::A1B5G5R5: | 86 | case TextureFormat::A1B5G5R5: |
| 85 | case TextureFormat::B5G6R5: | 87 | case TextureFormat::B5G6R5: |
| 88 | case TextureFormat::R8: | ||
| 86 | CopySwizzledData(width, height, bytes_per_pixel, bytes_per_pixel, data, | 89 | CopySwizzledData(width, height, bytes_per_pixel, bytes_per_pixel, data, |
| 87 | unswizzled_data.data(), true, block_height); | 90 | unswizzled_data.data(), true, block_height); |
| 88 | break; | 91 | break; |
| @@ -107,6 +110,7 @@ std::vector<u8> DecodeTexture(const std::vector<u8>& texture_data, TextureFormat | |||
| 107 | case TextureFormat::A2B10G10R10: | 110 | case TextureFormat::A2B10G10R10: |
| 108 | case TextureFormat::A1B5G5R5: | 111 | case TextureFormat::A1B5G5R5: |
| 109 | case TextureFormat::B5G6R5: | 112 | case TextureFormat::B5G6R5: |
| 113 | case TextureFormat::R8: | ||
| 110 | // TODO(Subv): For the time being just forward the same data without any decoding. | 114 | // TODO(Subv): For the time being just forward the same data without any decoding. |
| 111 | rgba_data = texture_data; | 115 | rgba_data = texture_data; |
| 112 | break; | 116 | break; |