diff --git a/app/src/main/cpp/skyline/gpu/presentation_engine.cpp b/app/src/main/cpp/skyline/gpu/presentation_engine.cpp index bcf8a7e4..bb4e89ac 100644 --- a/app/src/main/cpp/skyline/gpu/presentation_engine.cpp +++ b/app/src/main/cpp/skyline/gpu/presentation_engine.cpp @@ -121,10 +121,6 @@ namespace skyline::gpu { throw exception("Cannot update swapchain to accomodate image extent: {}x{} ({}x{}-{}x{})", extent.width, extent.height, capabilities.minImageExtent.width, capabilities.minImageExtent.height, capabilities.maxImageExtent.width, capabilities.maxImageExtent.height); vk::Format vkFormat{*format}; - if (format == gpu::format::R5G6B5Unorm) - // B5G6R5 isn't generally supported by the swapchain and the format is used for R5G6B5 with swapped R/B channels to avoid aliasing so we reverse that by using R5G6B5 as the underlying Vulkan format for the swapchain which should be automatically handled by the driver for any copies from B5G6R5 textures and the data representation should be the same as B5G6R5 with swapped R/B channels so not reporting the correct texture::Format should be fine - vkFormat = vk::Format::eR5G6B5UnormPack16; - if (swapchainFormat != format) { auto formats{gpu.vkPhysicalDevice.getSurfaceFormatsKHR(**vkSurface)}; if (std::find(formats.begin(), formats.end(), vk::SurfaceFormatKHR{vkFormat, vk::ColorSpaceKHR::eSrgbNonlinear}) == formats.end()) diff --git a/app/src/main/cpp/skyline/gpu/texture/format.h b/app/src/main/cpp/skyline/gpu/texture/format.h index 46a451c2..28404e26 100644 --- a/app/src/main/cpp/skyline/gpu/texture/format.h +++ b/app/src/main/cpp/skyline/gpu/texture/format.h @@ -64,10 +64,7 @@ namespace skyline::gpu::format { FORMAT_NORM_INT_FLOAT(R16, 16, eR16); FORMAT_NORM_INT_SRGB(R8G8, 16, eR8G8); FORMAT(B5G6R5Unorm, 16, eB5G6R5UnormPack16); - FORMAT(R5G6B5Unorm, 16, eB5G6R5UnormPack16, .swizzleMapping = { - .r = vk::ComponentSwizzle::eB, - .b = vk::ComponentSwizzle::eR - }); // Used by SurfaceFlinger + FORMAT(R5G6B5Unorm, 16, eR5G6B5UnormPack16); FORMAT(R4G4B4A4Unorm, 16, eR4G4B4A4UnormPack16, .swizzleMapping = { .r = vk::ComponentSwizzle::eA, .g = vk::ComponentSwizzle::eB,