Commit ee6721939459437ddfa422b204f0c66c3178d6ce

Lubosz Sarnecki 2021-10-06T16:51:42

SurfaceVk: Use vkGetPhysicalDeviceSurfaceFormats2KHR. Use VK_KHR_get_surface_capabilities2 to determine if the requested color space and surface format combination is supported. Create a DoesSurfaceSupportFormatAndColorspace helper function and use vkGetPhysicalDeviceSurfaceFormatsKHR as a fallback in a new DoesSurfaceSupportFormat helper function. Treat the surface format as not supported when a non-sRGB colorspace was requested and VK_KHR_get_surface_capabilities2 is not available. Move MapEglColorSpaceToVkColorSpace to anonymous namespace. Emit angle::Result::Incomplete if a suitable surface format is not found. Bug: angleproject:2514 Bug: b/201993125 Change-Id: I28baf904cf8846ca575eaf83c93b3f593c1b63a2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3208690 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Lubosz Sarnecki <lubosz.sarnecki@collabora.com>