diff options
| author | bunnei <bunneidev@gmail.com> | 2018-07-24 17:41:02 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-07-24 17:41:02 -0700 |
| commit | 5d4ad999cfa578dfdbdd0568ca4c7e094b91d0c5 (patch) | |
| tree | 055f787c3c64975ca720d92d5a90d58d4a51ce07 /src/video_core/textures/decoders.cpp | |
| parent | ea0bc8c002de3fc37d9405a576b956b90270a870 (diff) | |
| parent | 4cc1e180eccb4fa4df484badf1eaf60e6728752f (diff) | |
Merge pull request #810 from Subv/r16
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) { case TextureFormat::A1B5G5R5: case TextureFormat::B5G6R5: case TextureFormat::G8R8: + case TextureFormat::R16: return 2; case TextureFormat::R8: return 1; @@ -123,6 +124,7 @@ std::vector<u8> UnswizzleTexture(VAddr address, TextureFormat format, u32 width, case TextureFormat::R32_G32_B32_A32: case TextureFormat::R32_G32: case TextureFormat::R32: + case TextureFormat::R16: case TextureFormat::BF10GF11RF11: case TextureFormat::ASTC_2D_4X4: 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 case TextureFormat::R32_G32_B32_A32: case TextureFormat::R32_G32: case TextureFormat::R32: + case TextureFormat::R16: // TODO(Subv): For the time being just forward the same data without any decoding. rgba_data = texture_data; break; |
