From 379bf3686005df6d48b746f7ffd825895970a074 Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Fri, 4 Nov 2022 10:43:43 +0000 Subject: [PATCH] a/vk: Also try to use VK_KHR_global_priority when creating device --- src/xrt/auxiliary/vk/vk_bundle_init.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/xrt/auxiliary/vk/vk_bundle_init.c b/src/xrt/auxiliary/vk/vk_bundle_init.c index be6c0da29..a102485f7 100644 --- a/src/xrt/auxiliary/vk/vk_bundle_init.c +++ b/src/xrt/auxiliary/vk/vk_bundle_init.c @@ -988,7 +988,14 @@ vk_create_device(struct vk_bundle *vk, .pQueuePriorities = &queue_priority, }; - if (vk->has_EXT_global_priority) { +#ifdef VK_KHR_global_priority + static_assert(VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT == + VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_KHR, + "Vulkan structs doesn't have the same structure ID!"); +#endif + + if (vk->has_EXT_global_priority || vk->has_KHR_global_priority) { + // This is okay, see static_assert above. priority_info.pNext = queue_create_info.pNext; queue_create_info.pNext = (void *)&priority_info; }