diff --git a/app/src/main/cpp/skyline/gpu/texture/format.h b/app/src/main/cpp/skyline/gpu/texture/format.h index 622132ac..2776b79d 100644 --- a/app/src/main/cpp/skyline/gpu/texture/format.h +++ b/app/src/main/cpp/skyline/gpu/texture/format.h @@ -84,7 +84,10 @@ namespace skyline::gpu::format { FORMAT_NORM_INT_FLOAT(R16G16, 32, eR16G16); FORMAT(B10G11R11Float, 32, eB10G11R11UfloatPack32); FORMAT_NORM_INT_SRGB(R8G8B8A8, 32, eR8G8B8A8); - FORMAT_NORM_INT_SRGB(B8G8R8A8, 32, eB8G8R8A8); + FORMAT_NORM_INT_SRGB(B8G8R8A8, 32, eR8G8B8A8, .swizzleMapping = { + .r = vk::ComponentSwizzle::eB, + .b = vk::ComponentSwizzle::eR + }); // Used by SurfaceFlinger FORMAT_SUFF_NORM_INT(A2B10G10R10, 32, eA2B10G10R10, Pack32); FORMAT_SUFF_NORM_INT_SRGB(A8B8G8R8, 32, eA8B8G8R8, Pack32); FORMAT(E5B9G9R9Float, 32, eE5B9G9R9UfloatPack32); diff --git a/app/src/main/cpp/skyline/services/hosbinder/GraphicBufferProducer.cpp b/app/src/main/cpp/skyline/services/hosbinder/GraphicBufferProducer.cpp index f3068718..c9ead3cd 100644 --- a/app/src/main/cpp/skyline/services/hosbinder/GraphicBufferProducer.cpp +++ b/app/src/main/cpp/skyline/services/hosbinder/GraphicBufferProducer.cpp @@ -306,11 +306,12 @@ namespace skyline::service::hosbinder { case AndroidPixelFormat::RGBX8888: format = gpu::format::R8G8B8A8Unorm; break; - + case AndroidPixelFormat::BGRA8888: + format = gpu::format::B8G8R8A8Unorm; + break; case AndroidPixelFormat::RGB565: format = gpu::format::R5G6B5Unorm; break; - default: throw exception("Unknown format in buffer: '{}' ({})", ToString(handle.format), static_cast(handle.format)); }