OSDN Git Service

Limit Display-P3 surface formats to 8888
authorCourtney Goeltzenleuchter <courtneygo@google.com>
Thu, 28 Sep 2017 17:34:18 +0000 (11:34 -0600)
committerCourtney Goeltzenleuchter <courtneygo@google.com>
Thu, 28 Sep 2017 20:14:34 +0000 (14:14 -0600)
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

index a346c0a..665a32b 100644 (file)
@@ -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 =