From 5aaa64364e7a255948a44ef151208fe85dcd5834 Mon Sep 17 00:00:00 2001 From: Charles Giessen Date: Sat, 25 Apr 2020 18:53:21 -0600 Subject: vulkaninfo: use generate_source.py for autogen Previously, to update the autogen for vulkaninfo required running a separate cmake target. This commit puts it all into the same target for ease of maintenance. Change-Id: I98e35b01ee164e9917564f6b603e4a78c6138041 --- scripts/vulkaninfo_generator.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'scripts/vulkaninfo_generator.py') diff --git a/scripts/vulkaninfo_generator.py b/scripts/vulkaninfo_generator.py index 2d15526a..adc01865 100644 --- a/scripts/vulkaninfo_generator.py +++ b/scripts/vulkaninfo_generator.py @@ -80,6 +80,7 @@ std::string to_hex_str(Printer &p, T i) { else return to_hex_str(i); } + ''' @@ -104,14 +105,12 @@ predefined_types = ['char', 'VkBool32', 'uint32_t', 'uint8_t', 'int32_t', 'float', 'uint64_t', 'size_t', 'VkDeviceSize'] # 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 = {'phys_device_props2': {'extends': 'VkPhysicalDeviceProperties2', 'type': 'both'}, - 'phys_device_mem_props2': {'extends': 'VkPhysicalDeviceMemoryProperties2', 'type': 'device'}, - 'phys_device_features2': {'extends': 'VkPhysicalDeviceFeatures2,VkDeviceCreateInfo', 'type': 'device'}, - 'surface_capabilities2': {'extends': 'VkSurfaceCapabilities2KHR', 'type': 'both'}, - 'format_properties2': {'extends': 'VkFormatProperties2', 'type': 'device'} - } - - +EXTENSION_CATEGORIES = OrderedDict((('phys_device_props2', {'extends': 'VkPhysicalDeviceProperties2', 'type': 'both'}), + ('phys_device_mem_props2', {'extends': 'VkPhysicalDeviceMemoryProperties2', 'type': 'device'}), + ('phys_device_features2', {'extends': 'VkPhysicalDeviceFeatures2,VkDeviceCreateInfo', 'type': 'device'}), + ('surface_capabilities2', {'extends': 'VkSurfaceCapabilities2KHR', 'type': 'both'}), + ('format_properties2', {'extends': 'VkFormatProperties2', 'type': 'device'}) + )) class VulkanInfoGeneratorOptions(GeneratorOptions): def __init__(self, conventions=None, -- cgit v1.2.3