From: Charles Giessen Date: Sun, 14 Nov 2021 18:57:28 +0000 (-0700) Subject: vulkaninfo: Add Device & driver UUID to summary X-Git-Tag: upstream/1.3.208~31 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=81dbf823d8c17a53c048c255bc031ed31675dd65;p=platform%2Fupstream%2FVulkan-Tools.git vulkaninfo: Add Device & driver UUID to summary The Device and Driver UUID is identifying information that is useful to have at a glance. Adding it to the summary would help anyone needing to determine what their device & driver is without searching the entire vulkaninfo output first. --- diff --git a/vulkaninfo/vulkaninfo.cpp b/vulkaninfo/vulkaninfo.cpp index fa7a6db..1c26bbd 100644 --- a/vulkaninfo/vulkaninfo.cpp +++ b/vulkaninfo/vulkaninfo.cpp @@ -729,7 +729,7 @@ void DumpSummaryGPU(Printer &p, AppGpu &gpu) { (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_DRIVER_PROPERTIES_EXTENSION_NAME) || gpu.api_version.minor >= 2)) { void *place = gpu.props2.pNext; while (place) { - VkBaseOutStructure* structure = static_cast(place); + VkBaseOutStructure *structure = static_cast(place); if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES) { VkPhysicalDeviceDriverProperties *driver_props = reinterpret_cast(structure); DumpVkDriverId(p, "driverID", driver_props->driverID, 18); @@ -737,6 +737,11 @@ void DumpSummaryGPU(Printer &p, AppGpu &gpu) { p.PrintKeyString("driverInfo", driver_props->driverInfo, 18); DumpVkConformanceVersion(p, "conformanceVersion", driver_props->conformanceVersion, 18); } + if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES) { + VkPhysicalDeviceIDProperties *device_id_props = reinterpret_cast(structure); + p.PrintKeyString("deviceUUID", to_string_16(device_id_props->deviceUUID), 18); + p.PrintKeyString("driverUUID", to_string_16(device_id_props->driverUUID), 18); + } place = structure->pNext; } } @@ -748,7 +753,7 @@ void DumpPortability(Printer &p, AppGpu &gpu) { if (gpu.inst.CheckExtensionEnabled(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME)) { void *props_place = gpu.props2.pNext; while (props_place) { - VkBaseOutStructure* structure = static_cast(props_place); + VkBaseOutStructure *structure = static_cast(props_place); if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PORTABILITY_SUBSET_PROPERTIES_KHR) { VkPhysicalDevicePortabilitySubsetPropertiesKHR *props = reinterpret_cast(structure); @@ -760,7 +765,7 @@ void DumpPortability(Printer &p, AppGpu &gpu) { void *feats_place = gpu.features2.pNext; while (feats_place) { - VkBaseOutStructure* structure = static_cast(feats_place); + VkBaseOutStructure *structure = static_cast(feats_place); if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PORTABILITY_SUBSET_FEATURES_KHR) { VkPhysicalDevicePortabilitySubsetFeaturesKHR *features = reinterpret_cast(structure); @@ -1063,8 +1068,7 @@ int main(int argc, char **argv) { surface_extension.create_window(instance); surface_extension.surface = surface_extension.create_surface(instance); for (auto &phys_device : phys_devices) { - surfaces.push_back(std::unique_ptr( - new AppSurface(instance, phys_device, surface_extension))); + surfaces.push_back(std::unique_ptr(new AppSurface(instance, phys_device, surface_extension))); } }