aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/textures/decoders.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-05-27 12:14:08 -0400
committerGitHub <noreply@github.com>2018-05-27 12:14:08 -0400
commit7f155ba713c75f22e78068980d595ffc04b044fe (patch)
tree196ce0da28e2de37eb69df9b9fdbf3389a4bd3ac /src/video_core/textures/decoders.cpp
parent7029daa32e064caf27b88188a5ecef76b4807726 (diff)
parent7ddc872b529192fd822c1d759ccfac2398b6ca2a (diff)
Merge pull request #476 from Subv/a1bgr5
GPU: Implemented the A1B5G5R5 texture format (0x14)
Diffstat (limited to 'src/video_core/textures/decoders.cpp')
-rw-r--r--src/video_core/textures/decoders.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/video_core/textures/decoders.cpp b/src/video_core/textures/decoders.cpp
index 8b39b2bdf..ceb760e0f 100644
--- a/src/video_core/textures/decoders.cpp
+++ b/src/video_core/textures/decoders.cpp
@@ -55,6 +55,7 @@ u32 BytesPerPixel(TextureFormat format) {
case TextureFormat::A8R8G8B8:
case TextureFormat::A2B10G10R10:
return 4;
+ case TextureFormat::A1B5G5R5:
case TextureFormat::B5G6R5:
return 2;
default:
@@ -80,6 +81,7 @@ std::vector<u8> UnswizzleTexture(VAddr address, TextureFormat format, u32 width,
break;
case TextureFormat::A8R8G8B8:
case TextureFormat::A2B10G10R10:
+ case TextureFormat::A1B5G5R5:
case TextureFormat::B5G6R5:
CopySwizzledData(width, height, bytes_per_pixel, bytes_per_pixel, data,
unswizzled_data.data(), true, block_height);
@@ -103,6 +105,7 @@ std::vector<u8> DecodeTexture(const std::vector<u8>& texture_data, TextureFormat
case TextureFormat::DXT45:
case TextureFormat::A8R8G8B8:
case TextureFormat::A2B10G10R10:
+ case TextureFormat::A1B5G5R5:
case TextureFormat::B5G6R5:
// TODO(Subv): For the time being just forward the same data without any decoding.
rgba_data = texture_data;