From 4633dd9505e69fe03d6e1c704a53fa7a7d15b391 Mon Sep 17 00:00:00 2001 From: Subv Date: Wed, 4 Jul 2018 17:22:48 -0500 Subject: GPU: Implemented the BC7U texture format. Note: Our version of glad exports GL_COMPRESSED_RGBA_BPTC_UNORM as GL_COMPRESSED_RGBA_BPTC_UNORM_ARB, maybe it's time we update it. --- src/video_core/textures/decoders.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/video_core/textures') diff --git a/src/video_core/textures/decoders.cpp b/src/video_core/textures/decoders.cpp index d5ab4e4f9..b3937b2fe 100644 --- a/src/video_core/textures/decoders.cpp +++ b/src/video_core/textures/decoders.cpp @@ -52,6 +52,7 @@ u32 BytesPerPixel(TextureFormat format) { return 8; case TextureFormat::DXT23: case TextureFormat::DXT45: + case TextureFormat::BC7U: // In this case a 'pixel' actually refers to a 4x4 tile. return 16; case TextureFormat::ASTC_2D_4X4: @@ -98,6 +99,7 @@ std::vector UnswizzleTexture(VAddr address, TextureFormat format, u32 width, case TextureFormat::DXT23: case TextureFormat::DXT45: case TextureFormat::DXN1: + case TextureFormat::BC7U: // In the DXT and DXN formats, each 4x4 tile is swizzled instead of just individual pixel // values. CopySwizzledData(width / 4, height / 4, bytes_per_pixel, bytes_per_pixel, data, @@ -155,6 +157,7 @@ std::vector DecodeTexture(const std::vector& texture_data, TextureFormat case TextureFormat::DXT23: case TextureFormat::DXT45: case TextureFormat::DXN1: + case TextureFormat::BC7U: case TextureFormat::ASTC_2D_4X4: case TextureFormat::A8R8G8B8: case TextureFormat::A2B10G10R10: -- cgit v1.2.3