The fix resets the Android global vulkan context when running in XR mode to allow the XR module to drive the initialization via vulkan hooks.
This commit is contained in:
Fredia Huya-Kouadio
2026-02-12 14:14:23 -08:00
parent 20d58a38c6
commit 0ad63522d7
2 changed files with 18 additions and 0 deletions
@@ -715,6 +715,7 @@ void DisplayServerAndroid::free_vulkan_global_context() {
if (rendering_context_global != nullptr) {
memdelete(rendering_context_global);
rendering_context_global = nullptr;
rendering_context_global_checked = false;
}
}
#endif
@@ -781,6 +782,7 @@ DisplayServerAndroid::DisplayServerAndroid(const String &p_rendering_driver, Dis
#ifdef VULKAN_ENABLED
if (rendering_driver == "vulkan") {
check_vulkan_global_context(true);
if (rendering_context_global == nullptr) {
ERR_PRINT("Can't initialize display server with Vulkan driver because no Vulkan context is available.");
r_error = ERR_UNAVAILABLE;