diff options
| author | 2018-07-24 13:39:16 -0500 | |
|---|---|---|
| committer | 2018-07-24 13:39:16 -0500 | |
| commit | 4cc1e180eccb4fa4df484badf1eaf60e6728752f (patch) | |
| tree | 4d29ef2c2665c35f17988dc8fa515a105335ab6e /src/video_core/textures/decoders.cpp | |
| parent | Merge pull request #798 from lioncash/const (diff) | |
| download | yuzu-4cc1e180eccb4fa4df484badf1eaf60e6728752f.tar.gz yuzu-4cc1e180eccb4fa4df484badf1eaf60e6728752f.tar.xz yuzu-4cc1e180eccb4fa4df484badf1eaf60e6728752f.zip | |
GPU: Implemented the R16 and R16F texture formats.
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 cda2646ad..970c06e71 100644 --- a/src/video_core/textures/decoders.cpp +++ b/src/video_core/textures/decoders.cpp | |||
| @@ -66,6 +66,7 @@ u32 BytesPerPixel(TextureFormat format) { | |||
| 66 | case TextureFormat::A1B5G5R5: | 66 | case TextureFormat::A1B5G5R5: |
| 67 | case TextureFormat::B5G6R5: | 67 | case TextureFormat::B5G6R5: |
| 68 | case TextureFormat::G8R8: | 68 | case TextureFormat::G8R8: |
| 69 | case TextureFormat::R16: | ||
| 69 | return 2; | 70 | return 2; |
| 70 | case TextureFormat::R8: | 71 | case TextureFormat::R8: |
| 71 | return 1; | 72 | return 1; |
| @@ -123,6 +124,7 @@ std::vector<u8> UnswizzleTexture(VAddr address, TextureFormat format, u32 width, | |||
| 123 | case TextureFormat::R32_G32_B32_A32: | 124 | case TextureFormat::R32_G32_B32_A32: |
| 124 | case TextureFormat::R32_G32: | 125 | case TextureFormat::R32_G32: |
| 125 | case TextureFormat::R32: | 126 | case TextureFormat::R32: |
| 127 | case TextureFormat::R16: | ||
| 126 | case TextureFormat::BF10GF11RF11: | 128 | case TextureFormat::BF10GF11RF11: |
| 127 | case TextureFormat::ASTC_2D_4X4: | 129 | case TextureFormat::ASTC_2D_4X4: |
| 128 | CopySwizzledData(width, height, bytes_per_pixel, bytes_per_pixel, data, | 130 | CopySwizzledData(width, height, bytes_per_pixel, bytes_per_pixel, data, |
| @@ -181,6 +183,7 @@ std::vector<u8> DecodeTexture(const std::vector<u8>& texture_data, TextureFormat | |||
| 181 | case TextureFormat::R32_G32_B32_A32: | 183 | case TextureFormat::R32_G32_B32_A32: |
| 182 | case TextureFormat::R32_G32: | 184 | case TextureFormat::R32_G32: |
| 183 | case TextureFormat::R32: | 185 | case TextureFormat::R32: |
| 186 | case TextureFormat::R16: | ||
| 184 | // TODO(Subv): For the time being just forward the same data without any decoding. | 187 | // TODO(Subv): For the time being just forward the same data without any decoding. |
| 185 | rgba_data = texture_data; | 188 | rgba_data = texture_data; |
| 186 | break; | 189 | break; |