vulkaninfo: Fix device version check
authorXiaolei Yu <dreifachstein@gmail.com>
Mon, 28 Jun 2021 04:07:57 +0000 (12:07 +0800)
committerCharles Giessen <46324611+charles-lunarg@users.noreply.github.com>
Wed, 30 Jun 2021 15:22:20 +0000 (09:22 -0600)
am 72c2d5f0b0e59bf429144d2e60d8fd6ce1710887

vulkaninfo/vulkaninfo.h

index 9a74b9f..72854cf 100644 (file)
@@ -1487,12 +1487,12 @@ struct AppGpu {
 
     AppGpu(AppInstance &inst, uint32_t id, VkPhysicalDevice phys_device, pNextChainInfos chainInfos)
         : inst(inst), id(id), phys_device(phys_device) {
+        inst.dll.fp_vkGetPhysicalDeviceProperties(phys_device, &props);
+
         // needs to find the minimum of the instance and device version, and use that to print the device info
         uint32_t gpu_version = props.apiVersion < inst.instance_version ? props.apiVersion : inst.instance_version;
         api_version = make_vulkan_version(gpu_version);
 
-        inst.dll.fp_vkGetPhysicalDeviceProperties(phys_device, &props);
-
         inst.dll.fp_vkGetPhysicalDeviceMemoryProperties(phys_device, &memory_props);
 
         inst.dll.fp_vkGetPhysicalDeviceFeatures(phys_device, &features);