From 9cf1cdfaa89bcbb8fde1851b3f358570954eb120 Mon Sep 17 00:00:00 2001 From: Constantine Shablya Date: Fri, 7 Apr 2023 04:02:06 +0300 Subject: [PATCH] vulkan: put TEMPLATE_H before TEMPLATE_C Reviewed-by: Faith Ekstrand Part-of: --- .../util/vk_physical_device_features.py | 60 +++++++++---------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/src/vulkan/util/vk_physical_device_features.py b/src/vulkan/util/vk_physical_device_features.py index 53a61ff269f..9767000ea65 100644 --- a/src/vulkan/util/vk_physical_device_features.py +++ b/src/vulkan/util/vk_physical_device_features.py @@ -125,6 +125,36 @@ class FeatureStruct: s_type: str features: typing.List[str] +TEMPLATE_H = Template(COPYRIGHT + """ +/* This file generated from ${filename}, don't edit directly. */ +#ifndef VK_FEATURES_H +#define VK_FEATURES_H + +#ifdef __cplusplus +extern "C" { +#endif + +struct vk_features { +% for flag in all_flags: + bool ${flag}; +% endfor +}; + +void +vk_set_physical_device_features(struct vk_features *all_features, + const VkPhysicalDeviceFeatures2 *pFeatures); + +void +vk_set_physical_device_features_1_0(struct vk_features *all_features, + const VkPhysicalDeviceFeatures *pFeatures); + +#ifdef __cplusplus +} +#endif + +#endif +""", output_encoding='utf-8') + TEMPLATE_C = Template(COPYRIGHT + """ /* This file generated from ${filename}, don't edit directly. */ @@ -304,36 +334,6 @@ vk_set_physical_device_features_1_0(struct vk_features *all_features, } """, output_encoding='utf-8') -TEMPLATE_H = Template(COPYRIGHT + """ -/* This file generated from ${filename}, don't edit directly. */ -#ifndef VK_FEATURES_H -#define VK_FEATURES_H - -#ifdef __cplusplus -extern "C" { -#endif - -struct vk_features { -% for flag in all_flags: - bool ${flag}; -% endfor -}; - -void -vk_set_physical_device_features(struct vk_features *all_features, - const VkPhysicalDeviceFeatures2 *pFeatures); - -void -vk_set_physical_device_features_1_0(struct vk_features *all_features, - const VkPhysicalDeviceFeatures *pFeatures); - -#ifdef __cplusplus -} -#endif - -#endif -""", output_encoding='utf-8') - def get_pdev_features(doc): _type = doc.find(".types/type[@name='VkPhysicalDeviceFeatures']") if _type is not None: