diff --git a/server/compositor/compositor.cpp b/server/compositor/compositor.cpp index 87b519fd..0c800489 100644 --- a/server/compositor/compositor.cpp +++ b/server/compositor/compositor.cpp @@ -715,6 +715,7 @@ compositor::compositor(wivrn_session & session) : log_level); vk::detail::resultCheck(vk::Result(res), "vk_init_from_given"); + c_base->vk.version = vk_bundle::api_version; // vk_init_from_given can't enable calibrated timestamps; do it here. #ifdef VK_EXT_calibrated_timestamps c_base->vk.has_EXT_calibrated_timestamps = vk.has_device_ext(VK_EXT_CALIBRATED_TIMESTAMPS_EXTENSION_NAME); diff --git a/server/utils/wivrn_vk_bundle.cpp b/server/utils/wivrn_vk_bundle.cpp index 6c0b2104..705493a0 100644 --- a/server/utils/wivrn_vk_bundle.cpp +++ b/server/utils/wivrn_vk_bundle.cpp @@ -144,7 +144,7 @@ wivrn::vk_bundle::vk_bundle() : vk::ApplicationInfo app_info{ .pApplicationName = "WiVRn server", .pEngineName = "WiVRn", - .apiVersion = VK_API_VERSION_1_3, + .apiVersion = api_version, }; { // Required extensions diff --git a/server/utils/wivrn_vk_bundle.h b/server/utils/wivrn_vk_bundle.h index 3fcd5d57..280909a9 100644 --- a/server/utils/wivrn_vk_bundle.h +++ b/server/utils/wivrn_vk_bundle.h @@ -22,7 +22,6 @@ #include "vk/vk_allocator.h" #include #include -#include #include #include #include @@ -63,6 +62,7 @@ uint64_t vk_handle(const T & handle) struct vk_bundle { + static const uint32_t api_version = VK_API_VERSION_1_3; // Lockable that can be redirected to a pthread_mutex_t owned by monado, // so that all VkQueue submitters take the same lock. class queue_mutex