From 41d24475991bf8c63f8006e8a8bb4429cddceac0 Mon Sep 17 00:00:00 2001 From: Charles Giessen Date: Mon, 20 Dec 2021 17:35:36 -0600 Subject: vulkaninfo: Make chain iterators optional Some of the pNext chains didn't make use of the generic chain printers. Since they aren't being used in code, it is good to disable the generation of those printers. --- scripts/vulkaninfo_generator.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'scripts') diff --git a/scripts/vulkaninfo_generator.py b/scripts/vulkaninfo_generator.py index e7381e8b..3e569809 100644 --- a/scripts/vulkaninfo_generator.py +++ b/scripts/vulkaninfo_generator.py @@ -106,12 +106,12 @@ predefined_types = ['char', 'VkBool32', 'uint32_t', 'uint8_t', 'int32_t', # Types that need pNext Chains built. 'extends' is the xml tag used in the structextends member. 'type' can be device, instance, or both EXTENSION_CATEGORIES = OrderedDict(( - ('phys_device_props2', {'extends': 'VkPhysicalDeviceProperties2', 'type': 'both', 'holder_type': 'VkPhysicalDeviceProperties2'}), - ('phys_device_mem_props2', {'extends': 'VkPhysicalDeviceMemoryProperties2', 'type': 'device', 'holder_type':'VkPhysicalDeviceMemoryProperties2'}), - ('phys_device_features2', {'extends': 'VkPhysicalDeviceFeatures2,VkDeviceCreateInfo', 'type': 'device', 'holder_type': 'VkPhysicalDeviceFeatures2'}), - ('surface_capabilities2', {'extends': 'VkSurfaceCapabilities2KHR', 'type': 'both', 'holder_type': 'VkSurfaceCapabilities2KHR'}), - ('format_properties2', {'extends': 'VkFormatProperties2', 'type': 'device', 'holder_type':'VkFormatProperties2'}), - ('queue_properties2', {'extends': 'VkQueueFamilyProperties2', 'type': 'device', 'holder_type': 'VkQueueFamilyProperties2'}) + ('phys_device_props2', {'extends': 'VkPhysicalDeviceProperties2', 'type': 'both', 'holder_type': 'VkPhysicalDeviceProperties2', 'print_iterator': True}), + ('phys_device_mem_props2', {'extends': 'VkPhysicalDeviceMemoryProperties2', 'type': 'device', 'holder_type':'VkPhysicalDeviceMemoryProperties2', 'print_iterator': False}), + ('phys_device_features2', {'extends': 'VkPhysicalDeviceFeatures2,VkDeviceCreateInfo', 'type': 'device', 'holder_type': 'VkPhysicalDeviceFeatures2', 'print_iterator': True}), + ('surface_capabilities2', {'extends': 'VkSurfaceCapabilities2KHR', 'type': 'both', 'holder_type': 'VkSurfaceCapabilities2KHR', 'print_iterator': True}), + ('format_properties2', {'extends': 'VkFormatProperties2', 'type': 'device', 'holder_type':'VkFormatProperties2', 'print_iterator': True}), + ('queue_properties2', {'extends': 'VkQueueFamilyProperties2', 'type': 'device', 'holder_type': 'VkQueueFamilyProperties2', 'print_iterator': True}) )) class VulkanInfoGeneratorOptions(GeneratorOptions): def __init__(self, @@ -296,7 +296,8 @@ class VulkanInfoGenerator(OutputGenerator): out += PrintChainStruct(key, self.extension_sets[key], self.all_structures, value) for key, value in EXTENSION_CATEGORIES.items(): - out += PrintChainIterator(key, + if value.get('print_iterator'): + out += PrintChainIterator(key, self.extension_sets[key], self.all_structures, value.get('type'), self.extTypes, self.aliases, self.vulkan_versions) for s in (x for x in self.all_structures if x.name in structs_to_comp): -- cgit v1.2.3