1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-18 14:21:41 +00:00

Merge pull request #55020 from bruvzg/vlk_device_surface_check

This commit is contained in:
Rémi Verschelde
2022-01-17 13:34:23 +01:00
committed by GitHub
5 changed files with 219 additions and 124 deletions

View File

@@ -325,6 +325,7 @@ void Main::print_help(const char *p_binary) {
OS::get_singleton()->print("].\n");
OS::get_singleton()->print(" --rendering-driver <driver> Rendering driver (depends on display driver).\n");
OS::get_singleton()->print(" --gpu-index <device_index> Use a specific GPU (run with --verbose to get available device list).\n");
OS::get_singleton()->print(" --text-driver <driver> Text driver (Fonts, BiDi, shaping)\n");
@@ -793,6 +794,14 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
} else if (I->get() == "-w" || I->get() == "--windowed") { // force windowed window
init_windowed = true;
} else if (I->get() == "--gpu-index") {
if (I->next()) {
Engine::singleton->gpu_idx = I->next()->get().to_int();
N = I->next()->next();
} else {
OS::get_singleton()->print("Missing gpu index argument, aborting.\n");
goto error;
}
} else if (I->get() == "--vk-layers") {
Engine::singleton->use_validation_layers = true;
#ifdef DEBUG_ENABLED