1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

[Linux/BSD] Offload RenderingDevice creation test to subprocess.

This commit is contained in:
Pāvels Nadtočajevs
2025-03-04 10:39:04 +02:00
parent 1753893c60
commit 6ed12bfc5d
11 changed files with 149 additions and 50 deletions

View File

@@ -979,7 +979,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
String project_path = ".";
bool upwards = false;
String debug_uri = "";
#if defined(TOOLS_ENABLED) && defined(WINDOWS_ENABLED)
#if defined(TOOLS_ENABLED) && (defined(WINDOWS_ENABLED) || defined(LINUXBSD_ENABLED))
bool test_rd_creation = false;
bool test_rd_support = false;
#endif
@@ -1671,7 +1671,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
} else if (arg == "--debug-stringnames") {
StringName::set_debug_stringnames(true);
#endif
#if defined(TOOLS_ENABLED) && defined(WINDOWS_ENABLED)
#if defined(TOOLS_ENABLED) && (defined(WINDOWS_ENABLED) || defined(LINUXBSD_ENABLED))
} else if (arg == "--test-rd-support") {
test_rd_support = true;
} else if (arg == "--test-rd-creation") {
@@ -1880,12 +1880,12 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
#endif
}
#if defined(TOOLS_ENABLED) && defined(WINDOWS_ENABLED)
#if defined(TOOLS_ENABLED) && (defined(WINDOWS_ENABLED) || defined(LINUXBSD_ENABLED))
if (test_rd_support) {
// Test Rendering Device creation and exit.
OS::get_singleton()->set_crash_handler_silent();
if (OS::get_singleton()->_test_create_rendering_device()) {
if (OS::get_singleton()->_test_create_rendering_device(display_driver)) {
exit_err = ERR_HELP;
} else {
exit_err = ERR_UNAVAILABLE;
@@ -1895,7 +1895,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
// Test OpenGL context and Rendering Device simultaneous creation and exit.
OS::get_singleton()->set_crash_handler_silent();
if (OS::get_singleton()->_test_create_rendering_device_and_gl()) {
if (OS::get_singleton()->_test_create_rendering_device_and_gl(display_driver)) {
exit_err = ERR_HELP;
} else {
exit_err = ERR_UNAVAILABLE;