diff options
| author | Charles Giessen <charles@lunarg.com> | 2021-12-20 17:35:36 -0600 |
|---|---|---|
| committer | Charles Giessen <46324611+charles-lunarg@users.noreply.github.com> | 2022-02-02 16:22:12 -0700 |
| commit | 41d24475991bf8c63f8006e8a8bb4429cddceac0 (patch) | |
| tree | 0e917830a27b6e61411c8c1d89e2430fe28335dd /scripts/vulkaninfo_generator.py | |
| parent | 87b6c7021ac306e24ffa1a9e14bd39c1555f6f68 (diff) | |
| download | usermoji-41d24475991bf8c63f8006e8a8bb4429cddceac0.tar.xz | |
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.
Diffstat (limited to 'scripts/vulkaninfo_generator.py')
| -rw-r--r-- | scripts/vulkaninfo_generator.py | 15 |
1 files changed, 8 insertions, 7 deletions
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): |
