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
Add support for GPU #1026
Comments
would you consider wrapping |
I'd prefer to not have any GPU-specific code as it greatly increases the code complexity. |
In case it assists, this was my method of getting GPU information (in my implementation i only needed names), I used gfx_hal. fn get_gpus() -> Vec<String> {
let instance: gfx_backend_vulkan::Instance =
back::Instance::create("hayabusa", 1).unwrap();
let adapters: Vec<Adapter<Backend>> = instance.enumerate_adapters();
let mut names: Vec<String> = Vec::new();
for adapter in adapters {
names.push(adapter.info.name.to_string());
}
names
} |
I had in mind to use opengl/vulkan to query information like GPU type, name, total memory and if possible % usage, memory usage and temperature. If you are interested into adding this, it'd be very welcome! Also thanks for allowing me to discover |
So to get the total memory and potentially memory usage (I got it from here):
To get the GPU name/type, we can use |
@GuillaumeGomez |
It's possible to gather some GPU information with vulkan, like memory available and memory usage: https://www.asawicki.info/news_1695_there_is_a_way_to_query_gpu_memory_usage_in_vulkan_-_use_dxgi
The text was updated successfully, but these errors were encountered: