Skip to content

Conversation

@theaniketgiri
Copy link

  • 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.

- 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.
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);
Copy link
Member

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

Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants