From fcdf28ad94fb62d0fb76652af32a1f02d9d2c96b Mon Sep 17 00:00:00 2001 From: Faith Ekstrand Date: Wed, 3 May 2023 23:11:35 -0500 Subject: [PATCH] vulkan: Document vk_physical_device::supported_features While we're here, move it to after supported extensions to stay consistent with the vk_physical_device_init parameters. Reviewed-by: Iago Toral Quiroga Reviewed-by: Lionel Landwerlin Reviewed-by: Constantine Shablya Part-of: --- src/vulkan/runtime/vk_physical_device.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/vulkan/runtime/vk_physical_device.h b/src/vulkan/runtime/vk_physical_device.h index 074a96bf4f4..7cd4795097f 100644 --- a/src/vulkan/runtime/vk_physical_device.h +++ b/src/vulkan/runtime/vk_physical_device.h @@ -50,8 +50,6 @@ 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 @@ -64,6 +62,18 @@ struct vk_physical_device { */ struct vk_device_extension_table supported_extensions; + /** Table of all supported features + * + * This table is initialized from the `supported_features` parameter + * passed to `vk_physical_device_init()` if not `NULL`. If a `NULL` + * features table is passed, all features are initialized to false and + * it's the responsibility of the driver to populate the table. This may + * be useful if the driver's physical device initialization order is such + * that feature support cannot be determined until significant physical + * device setup work has already been done. + */ + struct vk_features supported_features; + /** Physical-device-level dispatch table */ struct vk_physical_device_dispatch_table dispatch_table;