aboutsummaryrefslogtreecommitdiff
path: root/scripts/vulkaninfo_generator.py
diff options
context:
space:
mode:
authorCharles Giessen <charles@lunarg.com>2023-04-03 20:55:31 -0600
committerCharles Giessen <46324611+charles-lunarg@users.noreply.github.com>2023-04-07 15:13:24 -0600
commit9178c4c8b468824dfb6056b8f3de996a6d6cc81d (patch)
tree0c6f869a534582afe9173df60f7359ceb51b5a9d /scripts/vulkaninfo_generator.py
parent6b0935cecee90ae9c6b42c43f663e793c68fc67d (diff)
downloadusermoji-9178c4c8b468824dfb6056b8f3de996a6d6cc81d.tar.xz
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.
Diffstat (limited to 'scripts/vulkaninfo_generator.py')
-rw-r--r--scripts/vulkaninfo_generator.py4
1 files changed, 3 insertions, 1 deletions
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"]: