vulkan: inline vk_get_physical_device_features into vk_common_GetPhysicalDeviceFeatures2

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22333>
This commit is contained in:
Constantine Shablya
2023-04-07 04:00:13 +03:00
committed by Marge Bot
parent 528d430ca1
commit 64f4b277ea
2 changed files with 8 additions and 18 deletions
-9
View File
@@ -117,15 +117,6 @@ vk_common_GetPhysicalDeviceFeatures(VkPhysicalDevice physicalDevice,
*pFeatures = features2.features;
}
VKAPI_ATTR void VKAPI_CALL
vk_common_GetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice,
VkPhysicalDeviceFeatures2 *pFeatures)
{
VK_FROM_HANDLE(vk_physical_device, pdevice, physicalDevice);
vk_get_physical_device_features(pFeatures, &pdevice->supported_features);
}
VKAPI_ATTR void VKAPI_CALL
vk_common_GetPhysicalDeviceProperties(VkPhysicalDevice physicalDevice,
VkPhysicalDeviceProperties *pProperties)
@@ -128,6 +128,7 @@ class FeatureStruct:
TEMPLATE_C = Template(COPYRIGHT + """
/* This file generated from ${filename}, don't edit directly. */
#include "vk_common_entrypoints.h"
#include "vk_log.h"
#include "vk_physical_device.h"
#include "vk_physical_device_features.h"
@@ -274,12 +275,14 @@ vk_set_physical_device_features(struct vk_features *all_features,
}
}
void
vk_get_physical_device_features(VkPhysicalDeviceFeatures2 *pFeatures,
const struct vk_features *all_features)
VKAPI_ATTR void VKAPI_CALL
vk_common_GetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice,
VkPhysicalDeviceFeatures2 *pFeatures)
{
VK_FROM_HANDLE(vk_physical_device, pdevice, physicalDevice);
% for flag in pdev_features:
pFeatures->features.${flag} = all_features->${flag};
pFeatures->features.${flag} = pdevice->supported_features.${flag};
% endfor
vk_foreach_struct(ext, pFeatures) {
@@ -288,7 +291,7 @@ vk_get_physical_device_features(VkPhysicalDeviceFeatures2 *pFeatures,
case ${f.s_type}: {
${f.c_type} *features = (void *) ext;
% for flag in f.features:
features->${flag} = all_features->${get_renamed_feature(f.c_type, flag)};
features->${flag} = pdevice->supported_features.${get_renamed_feature(f.c_type, flag)};
% endfor
break;
}
@@ -324,10 +327,6 @@ void
vk_set_physical_device_features(struct vk_features *all_features,
const VkPhysicalDeviceFeatures2 *pFeatures);
void
vk_get_physical_device_features(VkPhysicalDeviceFeatures2 *pFeatures,
const struct vk_features *all_features);
#ifdef __cplusplus
}
#endif