summaryrefslogtreecommitdiff
path: root/src/video_core/textures/decoders.cpp
diff options
context:
space:
mode:
authorGravatar bunnei2018-07-15 01:33:42 -0400
committerGravatar bunnei2018-07-15 01:33:42 -0400
commit3a96670f2df3dffd13381ed370eb0392350cf002 (patch)
tree1713dbfdf50bc634dcc0c73ace097b88ed088cf9 /src/video_core/textures/decoders.cpp
parentMerge pull request #665 from bunnei/fix-z24-s8 (diff)
downloadyuzu-3a96670f2df3dffd13381ed370eb0392350cf002.tar.gz
yuzu-3a96670f2df3dffd13381ed370eb0392350cf002.tar.xz
yuzu-3a96670f2df3dffd13381ed370eb0392350cf002.zip
gl_rasterizer_cache: Implement texture format G8R8.
Diffstat (limited to 'src/video_core/textures/decoders.cpp')
-rw-r--r--src/video_core/textures/decoders.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/video_core/textures/decoders.cpp b/src/video_core/textures/decoders.cpp
index a4ba9f66a..be18aa299 100644
--- a/src/video_core/textures/decoders.cpp
+++ b/src/video_core/textures/decoders.cpp
@@ -62,6 +62,7 @@ u32 BytesPerPixel(TextureFormat format) {
62 return 4; 62 return 4;
63 case TextureFormat::A1B5G5R5: 63 case TextureFormat::A1B5G5R5:
64 case TextureFormat::B5G6R5: 64 case TextureFormat::B5G6R5:
65 case TextureFormat::G8R8:
65 return 2; 66 return 2;
66 case TextureFormat::R8: 67 case TextureFormat::R8:
67 return 1; 68 return 1;
@@ -112,6 +113,7 @@ std::vector<u8> UnswizzleTexture(VAddr address, TextureFormat format, u32 width,
112 case TextureFormat::A1B5G5R5: 113 case TextureFormat::A1B5G5R5:
113 case TextureFormat::B5G6R5: 114 case TextureFormat::B5G6R5:
114 case TextureFormat::R8: 115 case TextureFormat::R8:
116 case TextureFormat::G8R8:
115 case TextureFormat::R16_G16_B16_A16: 117 case TextureFormat::R16_G16_B16_A16:
116 case TextureFormat::R32_G32_B32_A32: 118 case TextureFormat::R32_G32_B32_A32:
117 case TextureFormat::BF10GF11RF11: 119 case TextureFormat::BF10GF11RF11:
@@ -167,6 +169,7 @@ std::vector<u8> DecodeTexture(const std::vector<u8>& texture_data, TextureFormat
167 case TextureFormat::A1B5G5R5: 169 case TextureFormat::A1B5G5R5:
168 case TextureFormat::B5G6R5: 170 case TextureFormat::B5G6R5:
169 case TextureFormat::R8: 171 case TextureFormat::R8:
172 case TextureFormat::G8R8:
170 case TextureFormat::BF10GF11RF11: 173 case TextureFormat::BF10GF11RF11:
171 case TextureFormat::R32_G32_B32_A32: 174 case TextureFormat::R32_G32_B32_A32:
172 // TODO(Subv): For the time being just forward the same data without any decoding. 175 // TODO(Subv): For the time being just forward the same data without any decoding.