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

Commit a4154371 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Vulkan: Work-around Android start-up race condition" am: 9d98433a am: 985bb9b8

Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1902215

Change-Id: Ifed9bc2c5b31cd7e8bcd4194670999a29dc05c52
parents beaca83f 985bb9b8
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -965,6 +965,13 @@ VkResult LayerChain::ValidateExtensions(VkPhysicalDevice physical_dev,
    VkResult result = EnumerateDeviceExtensionProperties(physical_dev, nullptr,
                                                         &count, nullptr);
    if (result == VK_SUCCESS && count) {
        // Work-around a race condition during Android start-up, that can result
        // in the second call to EnumerateDeviceExtensionProperties having
        // another extension.  That causes the second call to return
        // VK_INCOMPLETE.  A work-around is to add 1 to "count" and ask for one
        // more extension property.  See: http://anglebug.com/6715 and
        // internal-to-Google b/206733351.
        count++;
        driver_extensions_ = AllocateDriverExtensionArray(count);
        result = (driver_extensions_)
                     ? EnumerateDeviceExtensionProperties(