From cc02214304d1586d9602facc46c99532b04ad583 Mon Sep 17 00:00:00 2001 From: Constantine Shablya Date: Thu, 6 Apr 2023 16:39:23 +0300 Subject: [PATCH] vulkan: add common implementation of vkGetPhysicalDeviceFeatures2 Part-of: --- src/vulkan/runtime/vk_physical_device.c | 9 +++++++++ src/vulkan/runtime/vk_physical_device.h | 3 +++ 2 files changed, 12 insertions(+) diff --git a/src/vulkan/runtime/vk_physical_device.c b/src/vulkan/runtime/vk_physical_device.c index 977ca83858f..333e44a8b0b 100644 --- a/src/vulkan/runtime/vk_physical_device.c +++ b/src/vulkan/runtime/vk_physical_device.c @@ -113,6 +113,15 @@ 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) diff --git a/src/vulkan/runtime/vk_physical_device.h b/src/vulkan/runtime/vk_physical_device.h index b047df1f18a..727ff3c2fa7 100644 --- a/src/vulkan/runtime/vk_physical_device.h +++ b/src/vulkan/runtime/vk_physical_device.h @@ -26,6 +26,7 @@ #include "vk_dispatch_table.h" #include "vk_extensions.h" #include "vk_object.h" +#include "vk_physical_device_features.h" #include "util/list.h" @@ -49,6 +50,8 @@ struct vk_physical_device { /** Instance which is the parent of this physical device */ struct vk_instance *instance; + struct vk_features supported_features; + /** Table of all supported device extensions * * This table is initialized from the `supported_extensions` parameter