diff --git a/src/xrt/auxiliary/vk/vk_bundle_init.c b/src/xrt/auxiliary/vk/vk_bundle_init.c index aaa47efe0..42b41ab9a 100644 --- a/src/xrt/auxiliary/vk/vk_bundle_init.c +++ b/src/xrt/auxiliary/vk/vk_bundle_init.c @@ -992,6 +992,8 @@ vk_init_from_given(struct vk_bundle *vk, VkDevice device, uint32_t queue_family_index, uint32_t queue_index, + bool external_fence_fd_enabled, + bool external_semaphore_fd_enabled, bool timeline_semaphore_enabled, enum u_logging_level log_level) { @@ -1022,6 +1024,15 @@ vk_init_from_given(struct vk_bundle *vk, // passed a vulkan context and do not call selectPhysicalDevice() vk->vkGetPhysicalDeviceMemoryProperties(vk->physical_device, &vk->device_memory_props); + // Vulkan does not let us read what extensions was enabled. + if (external_fence_fd_enabled) { + vk->has_KHR_external_fence_fd = true; + } + + // Vulkan does not let us read what extensions was enabled. + if (external_semaphore_fd_enabled) { + vk->has_KHR_external_semaphore_fd = true; + } #ifdef VK_KHR_timeline_semaphore /* diff --git a/src/xrt/auxiliary/vk/vk_helpers.h b/src/xrt/auxiliary/vk/vk_helpers.h index 4d7f1b95c..07a8bb02e 100644 --- a/src/xrt/auxiliary/vk/vk_helpers.h +++ b/src/xrt/auxiliary/vk/vk_helpers.h @@ -623,6 +623,8 @@ vk_init_from_given(struct vk_bundle *vk, VkDevice device, uint32_t queue_family_index, uint32_t queue_index, + bool external_fence_fd_enabled, + bool external_semaphore_fd_enabled, bool timeline_semaphore_enabled, enum u_logging_level log_level); diff --git a/src/xrt/compositor/client/comp_vk_client.c b/src/xrt/compositor/client/comp_vk_client.c index 58834c9ee..8abb8b0ba 100644 --- a/src/xrt/compositor/client/comp_vk_client.c +++ b/src/xrt/compositor/client/comp_vk_client.c @@ -818,6 +818,8 @@ client_vk_compositor_create(struct xrt_compositor_native *xcn, device, // device queueFamilyIndex, // queue_family_index queueIndex, // queue_index + true, // external_fence_fd_enabled + true, // external_semaphore_fd_enabled timeline_semaphore_enabled, // timeline_semaphore_enabled log_level); // log_level if (ret != VK_SUCCESS) {