Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 52ac1e92 authored by Jason Macnak's avatar Jason Macnak
Browse files

Allow PASS_THROUGH colorspace with R5G6B5, R16G16B16A16, A2B10G10R10

... to continue aosp/2157379 to pass dEQP tests with ANGLE
using PASS_THROUGH color space as the default.

Bug: 237512291
Test: cts -m CtsDeqpTestCases
          --module-arg CtsDeqpTestCases:include-filter:dEQP-EGL.*
Change-Id: I7753858bf5d740f5083e0e48d97be75b127ad11b
parent e29191c7
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -781,12 +781,16 @@ VkResult GetPhysicalDeviceSurfaceFormatsKHR(VkPhysicalDevice pdev,
    if (AHardwareBuffer_isSupported(&desc)) {
        all_formats.emplace_back(VkSurfaceFormatKHR{
            VK_FORMAT_R5G6B5_UNORM_PACK16, VK_COLOR_SPACE_SRGB_NONLINEAR_KHR});
        all_formats.emplace_back(VkSurfaceFormatKHR{
            VK_FORMAT_R5G6B5_UNORM_PACK16, VK_COLOR_SPACE_PASS_THROUGH_EXT});
    }

    desc.format = AHARDWAREBUFFER_FORMAT_R16G16B16A16_FLOAT;
    if (AHardwareBuffer_isSupported(&desc)) {
        all_formats.emplace_back(VkSurfaceFormatKHR{
            VK_FORMAT_R16G16B16A16_SFLOAT, VK_COLOR_SPACE_SRGB_NONLINEAR_KHR});
        all_formats.emplace_back(VkSurfaceFormatKHR{
            VK_FORMAT_R16G16B16A16_SFLOAT, VK_COLOR_SPACE_PASS_THROUGH_EXT});
        if (wide_color_support) {
            all_formats.emplace_back(
                VkSurfaceFormatKHR{VK_FORMAT_R16G16B16A16_SFLOAT,
@@ -802,6 +806,9 @@ VkResult GetPhysicalDeviceSurfaceFormatsKHR(VkPhysicalDevice pdev,
        all_formats.emplace_back(
            VkSurfaceFormatKHR{VK_FORMAT_A2B10G10R10_UNORM_PACK32,
                               VK_COLOR_SPACE_SRGB_NONLINEAR_KHR});
        all_formats.emplace_back(
            VkSurfaceFormatKHR{VK_FORMAT_A2B10G10R10_UNORM_PACK32,
                               VK_COLOR_SPACE_PASS_THROUGH_EXT});
        if (wide_color_support) {
            all_formats.emplace_back(
                VkSurfaceFormatKHR{VK_FORMAT_A2B10G10R10_UNORM_PACK32,