From d2f34796107ce8c4fe527dcad13c85b699b64c3f Mon Sep 17 00:00:00 2001 From: PixelyIon Date: Sat, 12 Mar 2022 20:15:00 +0530 Subject: [PATCH] Use `eB5G6R5UnormPack16` VkFormat for `B5G6R5Unorm` and `R5G6B5Unorm` Using `eB5G6R5UnormPack16` (with a swizzle for `R5G6B5Unorm`) removes the need for `VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT` when those formats are aliased which happens in Sonic Mania among other titles. --- app/src/main/cpp/skyline/gpu/texture/format.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/cpp/skyline/gpu/texture/format.h b/app/src/main/cpp/skyline/gpu/texture/format.h index 2e7b6a1d..1eb681fa 100644 --- a/app/src/main/cpp/skyline/gpu/texture/format.h +++ b/app/src/main/cpp/skyline/gpu/texture/format.h @@ -63,8 +63,8 @@ namespace skyline::gpu::format { FORMAT_NORM_INT_FLOAT(R16, 16, eR16); FORMAT_NORM_INT_SRGB(R8G8, 16, eR8G8); - FORMAT(R5G6B5Unorm, 16, eR5G6B5UnormPack16); FORMAT(B5G6R5Unorm, 16, eB5G6R5UnormPack16); + FORMAT(R5G6B5Unorm, 16, eB5G6R5UnormPack16, .swapRedBlue = true); // Used by SurfaceFlinger FORMAT(B5G5R5A1Unorm, 16, eB5G5R5A1UnormPack16); FORMAT(A1B5G5R5Unorm, 16, eA1R5G5B5UnormPack16, .swapRedBlue = true);