diff options
| author | 2021-11-30 20:01:47 +0000 | |
|---|---|---|
| committer | 2021-11-30 20:01:47 +0000 | |
| commit | 9d98433a588d0a1d80a79ce759cf5be9dd67a152 (patch) | |
| tree | 62c2bd4d42d23b2a2d65a22ea6d6dce0e174f0a2 /vulkan/libvulkan/api.cpp | |
| parent | 18e8bbb4d04d6324275369c203fca9d1edf51fd7 (diff) | |
| parent | bfb7199b594c705116571744c1504f29d5cfebef (diff) | |
Merge "Vulkan: Work-around Android start-up race condition"
Diffstat (limited to 'vulkan/libvulkan/api.cpp')
| -rw-r--r-- | vulkan/libvulkan/api.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/vulkan/libvulkan/api.cpp b/vulkan/libvulkan/api.cpp index d1cd397da4..fa3b2601a4 100644 --- a/vulkan/libvulkan/api.cpp +++ b/vulkan/libvulkan/api.cpp @@ -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( |