From bd7e03a6fa4b4843e924d6477cb7ef75d989ad5e Mon Sep 17 00:00:00 2001 From: Courtney Goeltzenleuchter Date: Thu, 28 Sep 2017 11:34:18 -0600 Subject: [PATCH] Limit Display-P3 surface formats to 8888 Discovered that FP16 and 1010102 may not be supported for Swapchain. Since we don't have a query mechanism defined, limit P3 to 8888 which must be supported. Bug: 66706404 Test: adb -d shell am start -n com.drawelements.deqp/android.app.NativeActivity \ -e cmdLine '"deqp --deqp-case=dEQP-VK.wsi.android.colorspace \ --deqp-log-filename=/sdcard/dEQP-Log.qpa"' Change-Id: If537c631cd40610f6a62c437f8a7aff70f742fff --- vulkan/libvulkan/swapchain.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/vulkan/libvulkan/swapchain.cpp b/vulkan/libvulkan/swapchain.cpp index a346c0ac76..665a32b90c 100644 --- a/vulkan/libvulkan/swapchain.cpp +++ b/vulkan/libvulkan/swapchain.cpp @@ -640,11 +640,9 @@ VkResult GetPhysicalDeviceSurfaceFormatsKHR(VkPhysicalDevice pdev, instance_data.hook_extensions.test(ProcHook::EXT_swapchain_colorspace); const VkSurfaceFormatKHR kWideColorFormats[] = { - {VK_FORMAT_R16G16B16A16_SFLOAT, - VK_COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT}, - {VK_FORMAT_R16G16B16A16_SFLOAT, - VK_COLOR_SPACE_EXTENDED_SRGB_NONLINEAR_EXT}, - {VK_FORMAT_A2R10G10B10_UNORM_PACK32, + {VK_FORMAT_R8G8B8A8_UNORM, + VK_COLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT}, + {VK_FORMAT_R8G8B8A8_SRGB, VK_COLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT}, }; const uint32_t kNumWideColorFormats = -- 2.11.0