From c079cf4eece8ca84c3786c8b5433ae9fca8f585f Mon Sep 17 00:00:00 2001 From: Subv Date: Sat, 21 Apr 2018 17:32:25 -0500 Subject: GPU: Implement the A2BGR10 texture format. --- src/video_core/textures/decoders.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/video_core/textures/decoders.cpp') 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 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 DecodeTexture(const std::vector& 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; -- cgit v1.2.3