-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added --gpu-index
to forwardable_cli_arguments
#75198
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally (using --rendering-method forward_plus --gpu-index 1
on Linux), it works.
You can test this on a system with a single GPU on Linux by having llvmpipe/Lavapipe installed, then open a project that uses Forward+ or Mobile from the project manager. This works too if the project manager is started with OpenGL, which is the default unless you specify --rendering-method forward_plus
.
forwardable_cli_arguments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems ok, though I find all this increasingly hacky. Only some options get forwarded, and they get forwarded to different contexts. It's pretty unpredictable without reading the source code.
There may be use cases such as running the editor on an iGPU to save battery during development, while running the game on dGPU because it requires all the performance. This change would prevent doing this as the setting will propagate to both editor and game.
But I guess it's not a big deal for such advanced options.
You would still be able to do so, as specifying |
Looks good! Could you squash the commits? See PR workflow for instructions. |
when the gpu index is specified through the CLI, that setting will be inherited by both the editor (if started through project manager) and instances of the game started through the editor Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
Anything else need to be done? |
Thanks! And congrats for your first merged Godot contribution 🎉 |
forwardable_cli_arguments
--gpu-index
to forwardable_cli_arguments
when the gpu index is specified through the CLI, that setting will be inherited by both the editor (if started through project manager) and instances of the game started through the editor
I feel this should be default behavior, as if a user specifies a GPU to be used it should be shared from project manager to editor, and editor to debug instance. This can still be overwritten at runtime with the project setting
editor/run/main_run_args