From e7bfd93541ad726f06597c85e26c051bef5b4ab9 Mon Sep 17 00:00:00 2001 From: Billy Laws Date: Wed, 12 Jan 2022 23:00:35 +0000 Subject: [PATCH] Implement BC7 format support Used by ARMS --- app/src/main/cpp/skyline/gpu/interconnect/graphics_context.h | 1 + app/src/main/cpp/skyline/gpu/texture/format.h | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/app/src/main/cpp/skyline/gpu/interconnect/graphics_context.h b/app/src/main/cpp/skyline/gpu/interconnect/graphics_context.h index 9eb769d7..74daf7e1 100644 --- a/app/src/main/cpp/skyline/gpu/interconnect/graphics_context.h +++ b/app/src/main/cpp/skyline/gpu/interconnect/graphics_context.h @@ -1691,6 +1691,7 @@ namespace skyline::gpu::interconnect { TIC_FORMAT_CASE_ST(Dxt1, Bc1, Unorm, R, G, B, A); TIC_FORMAT_CASE_ST(Dxn1, Bc4111R, Unorm, OneFloat, OneFloat, OneFloat, R); TIC_FORMAT_CASE_ST(Dxn1, Bc4RRR1, Unorm, R, R, R, OneFloat); + TIC_FORMAT_CASE_ST(BC7U, Bc7, Unorm, R, G, B, A); default: throw exception("Cannot translate TIC format: 0x{:X}", static_cast(format.Raw())); diff --git a/app/src/main/cpp/skyline/gpu/texture/format.h b/app/src/main/cpp/skyline/gpu/texture/format.h index c4ed542f..4be8a9d1 100644 --- a/app/src/main/cpp/skyline/gpu/texture/format.h +++ b/app/src/main/cpp/skyline/gpu/texture/format.h @@ -123,6 +123,11 @@ namespace skyline::gpu::format { } ); + FORMAT_SUFF_UNORM_SRGB(Bc7, 128, eBc7, Block, + .blockWidth = 4, + .blockHeight = 4 + ); + FORMAT_SUFF_UNORM_SRGB(Astc4x4, 128, eAstc4x4, Block, .blockWidth = 4, .blockHeight = 4