From a0be8597acbdc090a9f5776a430b9f1a941cadda Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Thu, 16 Mar 2023 09:38:38 +0000 Subject: [PATCH] v3dv: use common GetPhysicalDeviceFeatures Signed-off-by: Eric Engestrom Reviewed-by: Iago Toral Quiroga Part-of: --- src/broadcom/vulkan/v3dv_device.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/src/broadcom/vulkan/v3dv_device.c b/src/broadcom/vulkan/v3dv_device.c index c021867..298ae33 100644 --- a/src/broadcom/vulkan/v3dv_device.c +++ b/src/broadcom/vulkan/v3dv_device.c @@ -1085,12 +1085,14 @@ enumerate_devices(struct vk_instance *vk_instance) } VKAPI_ATTR void VKAPI_CALL -v3dv_GetPhysicalDeviceFeatures(VkPhysicalDevice physicalDevice, - VkPhysicalDeviceFeatures *pFeatures) +v3dv_GetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice, + VkPhysicalDeviceFeatures2 *pFeatures) { - memset(pFeatures, 0, sizeof(*pFeatures)); + V3DV_FROM_HANDLE(v3dv_physical_device, physical_device, physicalDevice); - *pFeatures = (VkPhysicalDeviceFeatures) { + memset(&pFeatures->features, 0, sizeof(pFeatures->features)); + + pFeatures->features = (VkPhysicalDeviceFeatures) { .robustBufferAccess = true, /* This feature is mandatory */ .fullDrawIndexUint32 = false, /* Only available since V3D 4.4.9.1 */ .imageCubeArray = true, @@ -1151,14 +1153,6 @@ v3dv_GetPhysicalDeviceFeatures(VkPhysicalDevice physicalDevice, .variableMultisampleRate = false, .inheritedQueries = true, }; -} - -VKAPI_ATTR void VKAPI_CALL -v3dv_GetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice, - VkPhysicalDeviceFeatures2 *pFeatures) -{ - V3DV_FROM_HANDLE(v3dv_physical_device, physical_device, physicalDevice); - v3dv_GetPhysicalDeviceFeatures(physicalDevice, &pFeatures->features); VkPhysicalDeviceVulkan13Features vk13 = { .inlineUniformBlock = true, -- 2.7.4