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

Commit 94ace213 authored by Ian Elliott's avatar Ian Elliott
Browse files

Add 2 addtional VkFormat's to vkGetPhysicalDeviceSurfaceFormatsKHR

The Android Vulkan loader initially supported only 3 VkFormat's for
swapchain creation, with a TODO comment to add more.  In order for
ANGLE to match native GLES drivers, the Android Vulkan loader needs to
support the following formats:

- VK_FORMAT_A2B10G10R10_UNORM_PACK32
- VK_FORMAT_R16G16B16A16_SFLOAT

Bug: b/124942437
Test: GLES dEQP on top of ANGLE on top of Vulkan
Change-Id: If893f4cc81c94242e6d66e0109572f9892323ea4
parent 9e9aae44
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -688,6 +688,8 @@ VkResult GetPhysicalDeviceSurfaceFormatsKHR(VkPhysicalDevice pdev,
        {VK_FORMAT_R8G8B8A8_UNORM, VK_COLOR_SPACE_SRGB_NONLINEAR_KHR},
        {VK_FORMAT_R8G8B8A8_SRGB, VK_COLOR_SPACE_SRGB_NONLINEAR_KHR},
        {VK_FORMAT_R5G6B5_UNORM_PACK16, VK_COLOR_SPACE_SRGB_NONLINEAR_KHR},
        {VK_FORMAT_A2B10G10R10_UNORM_PACK32, VK_COLOR_SPACE_SRGB_NONLINEAR_KHR},
        {VK_FORMAT_R16G16B16A16_SFLOAT, VK_COLOR_SPACE_SRGB_NONLINEAR_KHR},
    };
    const uint32_t kNumFormats = sizeof(kFormats) / sizeof(kFormats[0]);
    uint32_t total_num_formats = kNumFormats;