aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/textures/decoders.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-04-18 20:20:51 -0400
committerGitHub <noreply@github.com>2018-04-18 20:20:51 -0400
commit60e6e8953ef764eb2db46d336623831e6f0cc193 (patch)
tree35588db31eb7b9cfe98954c214dbb14df42e8ac2 /src/video_core/textures/decoders.cpp
parentce4f159b1cf2aa090e41dc0e2fbd65aa6a31942e (diff)
parent2985056340b04c81df6afcf841dd541c94204817 (diff)
Merge pull request #351 from Subv/tex_formats
GPU: Implemented the B5G6R5 format.
Diffstat (limited to 'src/video_core/textures/decoders.cpp')
-rw-r--r--src/video_core/textures/decoders.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/video_core/textures/decoders.cpp b/src/video_core/textures/decoders.cpp
index 9c2a10d2e..f4c7e40df 100644
--- a/src/video_core/textures/decoders.cpp
+++ b/src/video_core/textures/decoders.cpp
@@ -50,6 +50,8 @@ u32 BytesPerPixel(TextureFormat format) {
return 8;
case TextureFormat::A8R8G8B8:
return 4;
+ case TextureFormat::B5G6R5:
+ return 2;
default:
UNIMPLEMENTED_MSG("Format not implemented");
break;
@@ -70,6 +72,7 @@ std::vector<u8> UnswizzleTexture(VAddr address, TextureFormat format, u32 width,
unswizzled_data.data(), true, block_height);
break;
case TextureFormat::A8R8G8B8:
+ case TextureFormat::B5G6R5:
CopySwizzledData(width, height, bytes_per_pixel, bytes_per_pixel, data,
unswizzled_data.data(), true, block_height);
break;
@@ -89,6 +92,7 @@ std::vector<u8> DecodeTexture(const std::vector<u8>& texture_data, TextureFormat
switch (format) {
case TextureFormat::DXT1:
case TextureFormat::A8R8G8B8:
+ case TextureFormat::B5G6R5:
// TODO(Subv): For the time being just forward the same data without any decoding.
rgba_data = texture_data;
break;