From 6ae0762f5c05284cda768fff9334eee28f3d0355 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Iv=C3=A1n=20Briano?= Date: Thu, 7 May 2020 13:34:04 -0700 Subject: [PATCH] anv: use the correct format on Android MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Per https://android.googlesource.com/platform/frameworks/native/+/master/vulkan/libvulkan/swapchain.cpp#745 the format Android requires is R5G6B5, and we have it backwards here. Reviewed-by: Jason Ekstrand Reviewed-by: Tapani Pälli Part-of: --- src/intel/vulkan/anv_android.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/intel/vulkan/anv_android.c b/src/intel/vulkan/anv_android.c index b46a990b32e..8e6d0b65ea1 100644 --- a/src/intel/vulkan/anv_android.c +++ b/src/intel/vulkan/anv_android.c @@ -616,7 +616,7 @@ setup_gralloc0_usage(VkFormat format, VkImageUsageFlags imageUsage, */ switch (format) { case VK_FORMAT_B8G8R8A8_UNORM: - case VK_FORMAT_B5G6R5_UNORM_PACK16: + case VK_FORMAT_R5G6B5_UNORM_PACK16: case VK_FORMAT_R8G8B8A8_UNORM: case VK_FORMAT_R8G8B8A8_SRGB: *grallocUsage |= GRALLOC_USAGE_HW_FB | -- 2.30.2