Using latest cargo release of gfx (0.2)
I'm testing vulkan backend in an old laptop with onboard Intel graphics - therefore no Vulkan support. When calling instance.enumerate_adapters, it will panic with Unable to enumerate adapters: ERROR_INITIALIZATION_FAILED.
The problems are:
By addressing either one of these issues, an application could switch between backends if it detects that the default backend is unsupported without having to unwind panics (which is slow and not ergonomic), but the best would be having both these issues addressed.
I'm new to gfx so please tell me if there's anything that I'm missing.
I think we can get away with simply returning an empty Vec, plus logging the error code in this case. There isn't much value in switching that API entry point to return a Result<>, I think.
Outline for completion:
Feel free to ping me on GitHub, Discord, or in our Gitter channel (https://gitter.im/gfx-rs/gfx) if you need help :)