diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2022-01-17 13:34:23 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-17 13:34:23 +0100 |
commit | d9a4ff7583c137b661c7347179a9b0f54696eef7 (patch) | |
tree | f764892d84e4d8b70f6a7ecb64c552774c0b5e45 /main | |
parent | 8bdef23f7f26e085587e3dbcb5063dea2768cc88 (diff) | |
parent | b11e619b193470050da2fd20fd4cbdb9e791e2b3 (diff) |
Merge pull request #55020 from bruvzg/vlk_device_surface_check
Diffstat (limited to 'main')
-rw-r--r-- | main/main.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/main/main.cpp b/main/main.cpp index 99640bcb6e..4e63f8750a 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -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 |