Quick fix to address https://github.com/godotengine/godot/issues/115924
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:
1 parent
20d58a38c6
commit
0ad63522d7
2 files changed
+18
No files matched your search
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user