Fix heap reporting on drivers without VK_EXT_memory_budget

This code was skipping the initialization of memory_props2, but using it
later to report heap information.

Change-Id: Icee3c3e869cfc56ea76921b4bd53f243305a4194
diff --git a/vulkaninfo/vulkaninfo.c b/vulkaninfo/vulkaninfo.c
index 7afb3b9..d61eeb6 100644
--- a/vulkaninfo/vulkaninfo.c
+++ b/vulkaninfo/vulkaninfo.c
@@ -1108,9 +1108,7 @@
     AppGetPhysicalDeviceLayerExtensions(gpu, NULL, &gpu->device_extension_count, &gpu->device_extensions);
 
     if (CheckExtensionEnabled(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME, gpu->inst->inst_extensions,
-                              gpu->inst->inst_extensions_count) &&
-        CheckPhysicalDeviceExtensionIncluded(VK_EXT_MEMORY_BUDGET_EXTENSION_NAME, gpu->device_extensions,
-                                             gpu->device_extension_count)) {
+                              gpu->inst->inst_extensions_count)) {
         struct pNextChainBuildingBlockInfo mem_prop_chain_info[] = {
             {.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_BUDGET_PROPERTIES_EXT,
              .mem_size = sizeof(VkPhysicalDeviceMemoryBudgetPropertiesEXT)}};
@@ -1118,7 +1116,10 @@
         uint32_t mem_prop_chain_info_len = ARRAY_SIZE(mem_prop_chain_info);
 
         gpu->memory_props2.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2_KHR;
-        buildpNextChain((struct VkStructureHeader *)&gpu->memory_props2, mem_prop_chain_info, mem_prop_chain_info_len);
+        if (CheckPhysicalDeviceExtensionIncluded(VK_EXT_MEMORY_BUDGET_EXTENSION_NAME, gpu->device_extensions,
+                                                 gpu->device_extension_count)) {
+            buildpNextChain((struct VkStructureHeader *)&gpu->memory_props2, mem_prop_chain_info, mem_prop_chain_info_len);
+        }
 
         inst->vkGetPhysicalDeviceMemoryProperties2KHR(gpu->obj, &gpu->memory_props2);