summaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/main.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/main/main.cpp b/main/main.cpp
index c77942dd7a..a9e2d357fa 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -1150,6 +1150,9 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
rtm = OS::RENDER_THREAD_UNSAFE;
} else if (I->next()->get() == "separate") {
rtm = OS::RENDER_SEPARATE_THREAD;
+ } else {
+ OS::get_singleton()->print("Unknown render thread mode, aborting.\nValid options are 'unsafe', 'safe' and 'separate'.\n");
+ goto error;
}
N = I->next()->next();
@@ -1647,6 +1650,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
GLOBAL_DEF(PropertyInfo(Variant::STRING, "rendering/gl_compatibility/driver.android", PROPERTY_HINT_ENUM, driver_hints), default_driver);
GLOBAL_DEF(PropertyInfo(Variant::STRING, "rendering/gl_compatibility/driver.ios", PROPERTY_HINT_ENUM, driver_hints), default_driver);
GLOBAL_DEF(PropertyInfo(Variant::STRING, "rendering/gl_compatibility/driver.macos", PROPERTY_HINT_ENUM, driver_hints), default_driver);
+ GLOBAL_DEF_RST("rendering/gl_compatibility/nvidia_disable_threaded_optimization", true);
}
// Start with RenderingDevice-based backends. Should be included if any RD driver present.
@@ -1874,7 +1878,8 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
}
if (rtm >= 0 && rtm < 3) {
- if (editor) {
+ if (editor || project_manager) {
+ // Editor and project manager cannot run with rendering in a separate thread (they will crash on startup).
rtm = OS::RENDER_THREAD_SAFE;
}
OS::get_singleton()->_render_thread_mode = OS::RenderThreadMode(rtm);
@@ -2231,6 +2236,10 @@ Error Main::setup2() {
}
}
+ if (OS::get_singleton()->_render_thread_mode == OS::RENDER_SEPARATE_THREAD) {
+ WARN_PRINT("The Multi-Threaded rendering thread model is experimental, and has known issues which can lead to project crashes. Use the Single-Safe option in the project settings instead.");
+ }
+
/* Initialize Pen Tablet Driver */
{