summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Trevor Black <vantablack@google.com> 2022-03-15 21:46:39 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2022-03-15 21:46:39 +0000
commite8361aefe96e06097534bb276c08fbc6e9c0fdfe (patch)
treeab9556b360ef7bb91f32eb6a942a0d799e270a7c
parent32d9f66b9796a4ee82707cec6da4dbaafe0f2991 (diff)
parente91bd149d3e1a3fa8bcaf06ecafac362c723a815 (diff)
Merge "Revert "Make BT709 support conditional on swapchain ext enable"" into tm-dev
-rw-r--r--vulkan/libvulkan/swapchain.cpp14
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{