Hi, I'm trying to run the example that the repository contains using cargo run --release --example draw, unfortunately this errors pops up after compiling:
Finished release [optimized] target(s) in 0.69s
Running `target\release\examples\draw.exe`
thread 'main' panicked at 'Unable to enumerate instance extensions:
ERROR_INITIALIZATION_FAILED', C:\Users\Luis\.cargo\registry\src\github.com-1ecc6299db9ec823\gfx-backend-vulkan-0.4.3\src\lib.rs:354:35
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: process didn't exit successfully: `target\release\examples\draw.exe` (exit code: 101)
I tried running cargo update, but the error persists.
Here are provide some details that might be useful:
OS: Windows 10 x64
Integrated graphics: Radeon HD 7560D
rustc 1.43.0-nightly
I'd appreciate any suggestion and guidance. Thanks in advance.
Thanks for the issue @bluretrece!
Could you try running the example again, but this time with RUST_BACKTRACE=1 prefixed to the command? e.g.
RUST_BACKTRACE=1 cargo run --release --example draw
The error message thread 'main' panicked at 'Unable to enumerate instance extensions leads me to suspect that wgpu is unable to find a compatible graphics device for some reason. I believe it uses Vulkan by default, falling back to DX12 if Vulkan appears to be unavailable. Could you try testing the examples at the wgpu-rs repo and let me know if you run into the same issue there? This might help to distinguish between whether the issue is in wgpu, or the way that nannou uses wgpu. If it turns out that the wgpu examples do work, there's a chance that updating from wgpu 0.4 to 0.5 may fix this (I'm in the process of doing this update now).
Hello @mitchmindtree, I do hope my message finds you well. I'm able to run the wgpu cube example with no issues. Does this suggest that I should wait for a fix in the wgpu version? Thank you.
@mitchmindtree after updating the wgpu version as mentioned above I'm able to run the examples with no problems.
@mitchmindtree hi! Sorry for reopen this issue but, despite I'm able to run the examples from The Nannou Guide, when I create a project from scratch, nannou is still fetching wgpu 0.4, whereas the examples, they correctly fetches the 0.5 version. How can I solve this problem? I'd appreciate any suggestion. Thanks in advance.
@bluretrece the update to wgpu 0.5 is only on master currently and has not yet been published to crates.io. You can use the master version of nannou in your projects by specifying it in your Cargo.toml as follows:
nannou = { git = "https://github.com/nannou-org/nannou", branch = "master" }
You can get an idea of what items are not yet published to crates.io by checking out the changelog in the guide. Hope this helps!
It works now, thank you very much for the kind explanation!