wluma icon indicating copy to clipboard operation
wluma copied to clipboard

[Feature request]: Allow specifying the physical device for Vulkan

Open ilkecan opened this issue 3 years ago • 2 comments

Please describe your feature request

What do you think about adding an option to specify the physical device for Vulkan? I have two on my system and the first one doesn't have the required extensions, so Vulkan can't initialize. It works fine if I change the code to use the second one.

https://github.com/maximbaz/wluma/blob/0c49755fdcf19b22841844df6508f29c31975ce2/src/frame/vulkan.rs#L55-L58

ilkecan avatar Feb 28 '22 20:02 ilkecan

Thanks, truth be told I cut corners, hardcoded 0 and was waiting until someone asked for this, as I don't have a way to test it 😁

The correct approach is to query device capabilities and select the best device that supports everything we need.

Some examples:

If you would like to experiment and make a PR, let me know, it's very appreciated!

max-baz avatar Feb 28 '22 21:02 max-baz

I will look into this. Thanks for the pointers.

ilkecan avatar Feb 28 '22 22:02 ilkecan