vulkaninfo: Add VK_KHR_maintenance3 support
authorJeremy Kniager <jeremyk@lunarg.com>
Wed, 27 Jun 2018 17:49:49 +0000 (11:49 -0600)
committerjeremyk-lunarg <jeremyk@lunarg.com>
Fri, 29 Jun 2018 20:59:19 +0000 (14:59 -0600)
Added output for VkPhysicalDeviceMaintenance3Properties
struct info.

Change-Id: I8c7a21e27d0bdaf77af49881d777764f854d874c

vulkaninfo/vulkaninfo.c

index aabddb0..f51121a 100644 (file)
@@ -885,7 +885,9 @@ static void AppGpuInit(struct AppGpu *gpu, struct AppInstance *inst, uint32_t id
             {.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT,
              .mem_size = sizeof(VkPhysicalDeviceDiscardRectanglePropertiesEXT)},
             {.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES_KHR,
-             .mem_size = sizeof(VkPhysicalDeviceMultiviewPropertiesKHR)}};
+             .mem_size = sizeof(VkPhysicalDeviceMultiviewPropertiesKHR)},
+            {.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES_KHR,
+             .mem_size = sizeof(VkPhysicalDeviceMaintenance3PropertiesKHR)}};
 
         uint32_t chain_info_len = ARRAY_SIZE(chain_info);
 
@@ -2549,6 +2551,19 @@ static void AppGpuDumpProps(const struct AppGpu *gpu, FILE *out) {
                     printf("\tmaxMultiviewViewCount     = %u\n", multiview_props->maxMultiviewViewCount    );
                     printf("\tmaxMultiviewInstanceIndex = %u\n", multiview_props->maxMultiviewInstanceIndex);
                 }
+            } else if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES_KHR) {
+                VkPhysicalDeviceMaintenance3PropertiesKHR *maintenance3_props = (VkPhysicalDeviceMaintenance3PropertiesKHR*)structure;
+                if (html_output) {
+                    fprintf(out, "\n\t\t\t\t\t<details><summary>VkPhysicalDeviceMaintenance3Properties</summary>\n");
+                    fprintf(out, "\t\t\t\t\t\t<details><summary>maxPerSetDescriptors    = <div class='val'>" PRIuLEAST32 "</div></summary></details>\n", maintenance3_props->maxPerSetDescriptors);
+                    fprintf(out, "\t\t\t\t\t\t<details><summary>maxMemoryAllocationSize = <div class='val'>" PRIuLEAST32 "</div></summary></details>\n", maintenance3_props->maxMemoryAllocationSize);
+                    fprintf(out, "\t\t\t\t\t</details>\n");
+                } else if (human_readable_output) {
+                    printf("\nVkPhysicalDeviceMaintenance3Properties:\n");
+                    printf("=======================================\n");
+                    printf("\tmaxPerSetDescriptors    = " PRIuLEAST32 "\n", maintenance3_props->maxPerSetDescriptors   );
+                    printf("\tmaxMemoryAllocationSize = " PRIuLEAST32 "\n", maintenance3_props->maxMemoryAllocationSize);
+                }
             }
             place = structure->pNext;
         }