-
-
Notifications
You must be signed in to change notification settings - Fork 1k
feat(desktop): add --list-gpu-adapters CLI flag #3529
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
base: master
Are you sure you want to change the base?
feat(desktop): add --list-gpu-adapters CLI flag #3529
Conversation
- Add new CLI flag to list available GPU adapters and exit - Refactor gpu_context.rs to eliminate code duplication - Extract create_context_builder() helper function - Add documentation for public functions - Define ADAPTER_ENV_VAR constant for environment variable name - Remove verbose adapter logging on every startup Resolves TODO comments about adding CLI flag for adapter listing.
desktop/src/lib.rs
Outdated
| let wgpu_context = futures::executor::block_on(gpu_context::create_wgpu_context()); | ||
| if cli.list_gpu_adapters { | ||
| futures::executor::block_on(gpu_context::list_adapters()); | ||
| exit(0); |
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.
I'd prefer a return instead of an exit() since the exit does not do any cleanup
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.
Good catch, thanks! Changed to return so the lock and any other initialized resources get properly cleaned up.
|
Code looks good, I will merge this before the release, but currently (during testing) it's helpful to have the adapter info from all testers. |
Thanks for the review, @timon-schelling ! Glad to hear the code looks good. I'm on holiday break and have some free time to contribute more to Graphite. I've really enjoyed working on this and would love to help with other areas of the project. Are there any priority features or issues you'd like help with? I'm comfortable with Rust and happy to tackle anything from the backlog. Also open to discussing any new feature ideas if there are gaps you'd like filled. Let me know what would be most valuable! |
|
Are you on our discord? You can @ me there, in development or desktop-app channels. |
124235a to
a42cad8
Compare
Resolves TODO comments about adding CLI flag for adapter listing.