From 93fdf0bd74a981648895a04eb8d8f931c287a8bf Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Tue, 15 Nov 2022 00:47:42 +0000 Subject: [PATCH] a/vk: Expose vk_select_physical_device function --- src/xrt/auxiliary/vk/vk_bundle_init.c | 6 ++++++ src/xrt/auxiliary/vk/vk_helpers.h | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/src/xrt/auxiliary/vk/vk_bundle_init.c b/src/xrt/auxiliary/vk/vk_bundle_init.c index 3b3b7b721..55ddc02fb 100644 --- a/src/xrt/auxiliary/vk/vk_bundle_init.c +++ b/src/xrt/auxiliary/vk/vk_bundle_init.c @@ -944,6 +944,12 @@ filter_device_features(struct vk_bundle *vk, * */ +VkResult +vk_select_physical_device(struct vk_bundle *vk, int forced_index) +{ + return select_physical_device(vk, forced_index); +} + XRT_CHECK_RESULT VkResult vk_create_device(struct vk_bundle *vk, int forced_index, diff --git a/src/xrt/auxiliary/vk/vk_helpers.h b/src/xrt/auxiliary/vk/vk_helpers.h index 7f0f63c7e..b36d07256 100644 --- a/src/xrt/auxiliary/vk/vk_helpers.h +++ b/src/xrt/auxiliary/vk/vk_helpers.h @@ -618,6 +618,14 @@ vk_build_instance_extensions(struct vk_bundle *vk, void vk_fill_in_has_instance_extensions(struct vk_bundle *vk, struct u_string_list *ext_list); +/*! + * Setup the physical device, this is called by vk_create_device but has uses + * for outside of that. + * + * @ingroup aux_vk + */ +VkResult +vk_select_physical_device(struct vk_bundle *vk, int forced_index); /*! * Used to enable device features as a argument @ref vk_create_device.