summaryrefslogtreecommitdiffstats
path: root/src/video_core/textures
diff options
context:
space:
mode:
authorSubv <subv2112@gmail.com>2018-03-22 22:40:11 +0100
committerSubv <subv2112@gmail.com>2018-03-24 17:31:53 +0100
commit39e60cfeb10ef317521ff1685df3d265d2c9d5ef (patch)
treef6fee21c4607642cabea7c809a10cca7aaa7c794 /src/video_core/textures
parentFrontend: Allow opening the Surface View widget in the Qt frontend. (diff)
downloadyuzu-39e60cfeb10ef317521ff1685df3d265d2c9d5ef.tar
yuzu-39e60cfeb10ef317521ff1685df3d265d2c9d5ef.tar.gz
yuzu-39e60cfeb10ef317521ff1685df3d265d2c9d5ef.tar.bz2
yuzu-39e60cfeb10ef317521ff1685df3d265d2c9d5ef.tar.lz
yuzu-39e60cfeb10ef317521ff1685df3d265d2c9d5ef.tar.xz
yuzu-39e60cfeb10ef317521ff1685df3d265d2c9d5ef.tar.zst
yuzu-39e60cfeb10ef317521ff1685df3d265d2c9d5ef.zip
Diffstat (limited to 'src/video_core/textures')
-rw-r--r--src/video_core/textures/decoders.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/video_core/textures/decoders.cpp b/src/video_core/textures/decoders.cpp
index 300267209..2e87281eb 100644
--- a/src/video_core/textures/decoders.cpp
+++ b/src/video_core/textures/decoders.cpp
@@ -48,6 +48,8 @@ u32 BytesPerPixel(TextureFormat format) {
case TextureFormat::DXT1:
// In this case a 'pixel' actually refers to a 4x4 tile.
return 8;
+ case TextureFormat::A8R8G8B8:
+ return 4;
default:
UNIMPLEMENTED_MSG("Format not implemented");
break;
@@ -68,6 +70,10 @@ std::vector<u8> UnswizzleTexture(VAddr address, TextureFormat format, u32 width,
CopySwizzledData(width / 4, height / 4, bytes_per_pixel, bytes_per_pixel, data,
unswizzled_data.data(), true, DefaultBlockHeight);
break;
+ case TextureFormat::A8R8G8B8:
+ CopySwizzledData(width, height, bytes_per_pixel, bytes_per_pixel, data,
+ unswizzled_data.data(), true, DefaultBlockHeight);
+ break;
default:
UNIMPLEMENTED_MSG("Format not implemented");
break;
@@ -82,6 +88,11 @@ std::vector<u8> DecodeTexture(const std::vector<u8>& texture_data, TextureFormat
// TODO(Subv): Implement.
switch (format) {
+ case TextureFormat::DXT1:
+ case TextureFormat::A8R8G8B8:
+ // TODO(Subv): For the time being just forward the same data without any decoding.
+ rgba_data = texture_data;
+ break;
default:
UNIMPLEMENTED_MSG("Format not implemented");
break;