summaryrefslogtreecommitdiffstats
path: root/src/video_core/textures
diff options
context:
space:
mode:
authorSubv <subv2112@gmail.com>2018-05-30 04:49:37 +0200
committerSubv <subv2112@gmail.com>2018-05-30 04:49:37 +0200
commit734106dcb96b8b912bcb2e263d344fae1804b34e (patch)
tree7367df539beae496ecc4c7175f644d977e6a1a86 /src/video_core/textures
parentMerge pull request #480 from mailwl/bcat (diff)
downloadyuzu-734106dcb96b8b912bcb2e263d344fae1804b34e.tar
yuzu-734106dcb96b8b912bcb2e263d344fae1804b34e.tar.gz
yuzu-734106dcb96b8b912bcb2e263d344fae1804b34e.tar.bz2
yuzu-734106dcb96b8b912bcb2e263d344fae1804b34e.tar.lz
yuzu-734106dcb96b8b912bcb2e263d344fae1804b34e.tar.xz
yuzu-734106dcb96b8b912bcb2e263d344fae1804b34e.tar.zst
yuzu-734106dcb96b8b912bcb2e263d344fae1804b34e.zip
Diffstat (limited to 'src/video_core/textures')
-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 ceb760e0f..9d7b73b73 100644
--- a/src/video_core/textures/decoders.cpp
+++ b/src/video_core/textures/decoders.cpp
@@ -58,6 +58,8 @@ u32 BytesPerPixel(TextureFormat format) {
case TextureFormat::A1B5G5R5:
case TextureFormat::B5G6R5:
return 2;
+ case TextureFormat::R8:
+ return 1;
default:
UNIMPLEMENTED_MSG("Format not implemented");
break;
@@ -83,6 +85,7 @@ std::vector<u8> UnswizzleTexture(VAddr address, TextureFormat format, u32 width,
case TextureFormat::A2B10G10R10:
case TextureFormat::A1B5G5R5:
case TextureFormat::B5G6R5:
+ case TextureFormat::R8:
CopySwizzledData(width, height, bytes_per_pixel, bytes_per_pixel, data,
unswizzled_data.data(), true, block_height);
break;
@@ -107,6 +110,7 @@ std::vector<u8> DecodeTexture(const std::vector<u8>& texture_data, TextureFormat
case TextureFormat::A2B10G10R10:
case TextureFormat::A1B5G5R5:
case TextureFormat::B5G6R5:
+ case TextureFormat::R8:
// TODO(Subv): For the time being just forward the same data without any decoding.
rgba_data = texture_data;
break;