diff options
| author | 2022-03-09 22:06:55 +0000 | |
|---|---|---|
| committer | 2022-03-15 17:19:50 +0000 | |
| commit | e91bd149d3e1a3fa8bcaf06ecafac362c723a815 (patch) | |
| tree | e30e03ebdd99905821efe741d2663dfc1169cb24 | |
| parent | 3b7c2c61752b3580c110aebeb48508c162e13641 (diff) | |
Revert "Make BT709 support conditional on swapchain ext enable"
This reverts commit ea5745afb64f0f71ccbc36d617a73d0ce0db2e9f.
Reason for revert: Need to land in aosp
Change-Id: Iaec5f22329ac99593d080e7c3e01022e85420ada
Merged-In: Id056873193a711de140acb2f1dfd4a734ecaec4b
| -rw-r--r-- | vulkan/libvulkan/swapchain.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/vulkan/libvulkan/swapchain.cpp b/vulkan/libvulkan/swapchain.cpp index 20a0aad712..5fdee217ab 100644 --- a/vulkan/libvulkan/swapchain.cpp +++ b/vulkan/libvulkan/swapchain.cpp @@ -719,8 +719,6 @@ VkResult GetPhysicalDeviceSurfaceFormatsKHR(VkPhysicalDevice pdev, bool wide_color_support = false; uint64_t consumer_usage = 0; - bool swapchain_ext = - instance_data.hook_extensions.test(ProcHook::EXT_swapchain_colorspace); if (surface_handle == VK_NULL_HANDLE) { ProcHook::Extension surfaceless = ProcHook::GOOGLE_surfaceless_query; bool surfaceless_enabled = @@ -748,7 +746,9 @@ VkResult GetPhysicalDeviceSurfaceFormatsKHR(VkPhysicalDevice pdev, consumer_usage = surface.consumer_usage; } - wide_color_support = wide_color_support && swapchain_ext; + wide_color_support = + wide_color_support && + instance_data.hook_extensions.test(ProcHook::EXT_swapchain_colorspace); AHardwareBuffer_Desc desc = {}; desc.width = 1; @@ -760,12 +760,8 @@ VkResult GetPhysicalDeviceSurfaceFormatsKHR(VkPhysicalDevice pdev, // We must support R8G8B8A8 std::vector<VkSurfaceFormatKHR> all_formats = { {VK_FORMAT_R8G8B8A8_UNORM, VK_COLOR_SPACE_SRGB_NONLINEAR_KHR}, - {VK_FORMAT_R8G8B8A8_SRGB, VK_COLOR_SPACE_SRGB_NONLINEAR_KHR}}; - - if (swapchain_ext) { - all_formats.emplace_back(VkSurfaceFormatKHR{ - VK_FORMAT_R8G8B8A8_UNORM, VK_COLOR_SPACE_BT709_LINEAR_EXT}); - } + {VK_FORMAT_R8G8B8A8_SRGB, VK_COLOR_SPACE_SRGB_NONLINEAR_KHR}, + {VK_FORMAT_R8G8B8A8_UNORM, VK_COLOR_SPACE_BT709_LINEAR_EXT}}; if (wide_color_support) { all_formats.emplace_back(VkSurfaceFormatKHR{ |