mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-07 19:30:12 +01:00
vulkan: put TEMPLATE_H before TEMPLATE_C
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22333>
This commit is contained in:
parent
005cfc63fc
commit
9cf1cdfaa8
1 changed files with 30 additions and 30 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue