From 9178c4c8b468824dfb6056b8f3de996a6d6cc81d Mon Sep 17 00:00:00 2001 From: Charles Giessen Date: Mon, 3 Apr 2023 20:55:31 -0600 Subject: vulkaninfo: Use VkFormatFeatureFlags2 by default Until now, vulkaninfo was only displaying VkFormatFeatureFlagBits, which means that many of the newer capabilities of formats were not being shown. Now, vulkaninfo will default to printing VkFormatFeatureFlagsBits2 and only use VkFormatFeatureFlagBits when the VK_KHR_format_feature_flags_2 is not supported by the device. --- scripts/vulkaninfo_generator.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'scripts/vulkaninfo_generator.py') diff --git a/scripts/vulkaninfo_generator.py b/scripts/vulkaninfo_generator.py index a66d1d6a..37ca830b 100644 --- a/scripts/vulkaninfo_generator.py +++ b/scripts/vulkaninfo_generator.py @@ -81,7 +81,7 @@ std::string to_hex_str(Printer &p, const T i) { # used in the .cpp code structures_to_gen = ['VkExtent3D', 'VkExtent2D', 'VkPhysicalDeviceLimits', 'VkPhysicalDeviceFeatures', 'VkPhysicalDeviceSparseProperties', - 'VkSurfaceCapabilitiesKHR', 'VkSurfaceFormatKHR', 'VkLayerProperties', 'VkPhysicalDeviceToolProperties'] + 'VkSurfaceCapabilitiesKHR', 'VkSurfaceFormatKHR', 'VkLayerProperties', 'VkPhysicalDeviceToolProperties', 'VkFormatProperties'] enums_to_gen = ['VkResult', 'VkFormat', 'VkPresentModeKHR', 'VkPhysicalDeviceType', 'VkImageTiling'] flags_to_gen = ['VkSurfaceTransformFlagsKHR', 'VkCompositeAlphaFlagsKHR', 'VkSurfaceCounterFlagsEXT', 'VkQueueFlags', @@ -587,6 +587,8 @@ def PrintStructure(struct, types_to_gen, structure_names, aliases): out += f' p.PrintKeyValue("{v.name}", obj.{v.name});\n' elif v.name not in names_to_ignore: # if it is an enum/flag/bitmask + if v.typeID in ['VkFormatFeatureFlags', 'VkFormatFeatureFlags2']: + out += ' p.SetOpenDetails();\n' # special case so that feature flags are open in html output out += f' Dump{v.typeID}(p, "{v.name}", obj.{v.name});\n' if struct.name in ["VkPhysicalDeviceLimits", "VkPhysicalDeviceSparseProperties"]: -- cgit v1.2.3