summaryrefslogtreecommitdiffstats
path: root/src/video_core/textures
diff options
context:
space:
mode:
authorSubv <subv2112@gmail.com>2018-04-22 00:32:25 +0200
committerSubv <subv2112@gmail.com>2018-04-22 00:32:25 +0200
commitc079cf4eece8ca84c3786c8b5433ae9fca8f585f (patch)
tree184a2ca7394607b8b0e57c3390edf61be58e15ea /src/video_core/textures
parentMerge pull request #377 from adityaruplaha/sdl2-fullscreen (diff)
downloadyuzu-c079cf4eece8ca84c3786c8b5433ae9fca8f585f.tar
yuzu-c079cf4eece8ca84c3786c8b5433ae9fca8f585f.tar.gz
yuzu-c079cf4eece8ca84c3786c8b5433ae9fca8f585f.tar.bz2
yuzu-c079cf4eece8ca84c3786c8b5433ae9fca8f585f.tar.lz
yuzu-c079cf4eece8ca84c3786c8b5433ae9fca8f585f.tar.xz
yuzu-c079cf4eece8ca84c3786c8b5433ae9fca8f585f.tar.zst
yuzu-c079cf4eece8ca84c3786c8b5433ae9fca8f585f.zip
Diffstat (limited to 'src/video_core/textures')
-rw-r--r--src/video_core/textures/decoders.cpp3
-rw-r--r--src/video_core/textures/texture.h1
2 files changed, 4 insertions, 0 deletions
diff --git a/src/video_core/textures/decoders.cpp b/src/video_core/textures/decoders.cpp
index 4df687786..e0509f0ce 100644
--- a/src/video_core/textures/decoders.cpp
+++ b/src/video_core/textures/decoders.cpp
@@ -53,6 +53,7 @@ u32 BytesPerPixel(TextureFormat format) {
// In this case a 'pixel' actually refers to a 4x4 tile.
return 16;
case TextureFormat::A8R8G8B8:
+ case TextureFormat::A2B10G10R10:
return 4;
case TextureFormat::B5G6R5:
return 2;
@@ -78,6 +79,7 @@ std::vector<u8> UnswizzleTexture(VAddr address, TextureFormat format, u32 width,
unswizzled_data.data(), true, block_height);
break;
case TextureFormat::A8R8G8B8:
+ case TextureFormat::A2B10G10R10:
case TextureFormat::B5G6R5:
CopySwizzledData(width, height, bytes_per_pixel, bytes_per_pixel, data,
unswizzled_data.data(), true, block_height);
@@ -100,6 +102,7 @@ std::vector<u8> DecodeTexture(const std::vector<u8>& texture_data, TextureFormat
case TextureFormat::DXT23:
case TextureFormat::DXT45:
case TextureFormat::A8R8G8B8:
+ case TextureFormat::A2B10G10R10:
case TextureFormat::B5G6R5:
// TODO(Subv): For the time being just forward the same data without any decoding.
rgba_data = texture_data;
diff --git a/src/video_core/textures/texture.h b/src/video_core/textures/texture.h
index 86e45aa88..dc004d361 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,
+ A2B10G10R10 = 0x9,
B5G6R5 = 0x15,
DXT1 = 0x24,
DXT23 = 0x25,