summaryrefslogtreecommitdiffstats
path: root/src/video_core/textures
diff options
context:
space:
mode:
authorSubv <subv2112@gmail.com>2018-04-19 01:11:14 +0200
committerSubv <subv2112@gmail.com>2018-04-19 01:16:45 +0200
commit2985056340b04c81df6afcf841dd541c94204817 (patch)
tree6129616b49d65f4dce32be3f702a9f66cbc51c87 /src/video_core/textures
parentMerge pull request #350 from Subv/tex_components (diff)
downloadyuzu-2985056340b04c81df6afcf841dd541c94204817.tar
yuzu-2985056340b04c81df6afcf841dd541c94204817.tar.gz
yuzu-2985056340b04c81df6afcf841dd541c94204817.tar.bz2
yuzu-2985056340b04c81df6afcf841dd541c94204817.tar.lz
yuzu-2985056340b04c81df6afcf841dd541c94204817.tar.xz
yuzu-2985056340b04c81df6afcf841dd541c94204817.tar.zst
yuzu-2985056340b04c81df6afcf841dd541c94204817.zip
Diffstat (limited to 'src/video_core/textures')
-rw-r--r--src/video_core/textures/decoders.cpp4
-rw-r--r--src/video_core/textures/texture.h1
2 files changed, 5 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;
diff --git a/src/video_core/textures/texture.h b/src/video_core/textures/texture.h
index 09d2317e0..86e45aa88 100644
--- a/src/video_core/textures/texture.h
+++ b/src/video_core/textures/texture.h
@@ -15,6 +15,7 @@ namespace Texture {
enum class TextureFormat : u32 {
A8R8G8B8 = 0x8,
+ B5G6R5 = 0x15,
DXT1 = 0x24,
DXT23 = 0x25,
DXT45 = 0x26,