diff --git a/src/xrt/compositor/util/comp_vulkan.c b/src/xrt/compositor/util/comp_vulkan.c index 369a08eb1..327e0be87 100644 --- a/src/xrt/compositor/util/comp_vulkan.c +++ b/src/xrt/compositor/util/comp_vulkan.c @@ -282,6 +282,12 @@ create_device(struct vk_bundle *vk, const struct comp_vulkan_arguments *vk_args) .synchronization_2 = true, }; + ret = vk_init_mutex(vk); + if (ret != VK_SUCCESS) { + VK_ERROR_RET(vk, "vk_init_mutex", "Failed to init mutex.", ret); + return ret; + } + // No other way then to try to see if realtime is available. for (size_t i = 0; i < ARRAY_SIZE(prios); i++) { ret = vk_create_device( // @@ -316,12 +322,6 @@ create_device(struct vk_bundle *vk, const struct comp_vulkan_arguments *vk_args) return ret; } - ret = vk_init_mutex(vk); - if (ret != VK_SUCCESS) { - VK_ERROR_RET(vk, "vk_init_mutex", "Failed to init mutex.", ret); - return ret; - } - // Print device information. vk_print_opened_device_info(vk, U_LOGGING_INFO);