vulkaninfo: fix device ext list having bad items
authorCharles Giessen <charles@lunarg.com>
Tue, 28 Jul 2020 20:29:09 +0000 (14:29 -0600)
committerCharles Giessen <46324611+charles-lunarg@users.noreply.github.com>
Tue, 28 Jul 2020 21:18:48 +0000 (15:18 -0600)
vkconfig exposed an issue in the vulkan-loader which resulted in two different sizes
returned from vkEnumerateDeviceExtensionProperties(). A full fix requires a change to
the loader, but this commit stops the issue from happening in vulkaninfo.

Change-Id: I808d1fd13868711675aae5c91ea5100ec8cbc316

vulkaninfo/vulkaninfo.h

index c83691b..8eca1ea 100644 (file)
@@ -240,6 +240,7 @@ auto GetVectorInit(const char *func_name, F &&f, T init, Ts &&... ts) -> std::ve
         if (err) THROW_VK_ERR(func_name, err);
         results.resize(count, init);
         err = f(ts..., &count, results.data());
+        results.resize(count);
     } while (err == VK_INCOMPLETE);
     if (err) THROW_VK_ERR(func_name, err);
     return results;