Skip to content
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

Crashes with assertion failed #148

Closed
pickx opened this issue Jan 9, 2020 · 3 comments · Fixed by #354
Closed

Crashes with assertion failed #148

pickx opened this issue Jan 9, 2020 · 3 comments · Fixed by #354
Labels
bug Something isn't working question Further information is requested
Milestone

Comments

@pickx
Copy link

pickx commented Jan 9, 2020

Unfortunately, whenever I try to run any example, a window pops up then immediately closes with the following assertion failure

thread 'main' panicked at 'assertion failed: suf.supports_queue_family(&adapter.raw.queue_families[0])', /home/{USER}/.cargo/registry/src/{...}/wgpu-native-0.4.2/src/device.rs:2065:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

I'm assuming this has to do with the environment I'm running this in? I'm using Linux Manjaro with a GTX 1080 and a Coffee Lake CPU.

@hecrj hecrj added bug Something isn't working question Further information is requested labels Jan 9, 2020
@hecrj hecrj added this to the 0.1.0 milestone Jan 9, 2020
@hecrj
Copy link
Member

hecrj commented Jan 9, 2020

Most likely a graphics driver issue, may be related to #98 or #79. Ensure you have Vulkan-compatible graphics drivers installed.

We should mention this somewhere in the README.

@pickx
Copy link
Author

pickx commented Jan 12, 2020

Yeah, I think it's Vulkan. Tried some other Vulkan demos and they don't work either.
I spent a lot of time trying to get Vulkan support with nVidia graphics on Manjaro, but no dice.

@AlisCode
Copy link
Contributor

Ho yes I'm having the same issue on my main computer : my CPU is an old i5-4670k (Haswell) and the drivers don't have a correct Vulkan implementation, not one that works with wgpu anyway.

The way I test the iced (wgpu backend) examples right now on this setup is by applying this patch :

diff --git a/wgpu/src/renderer.rs b/wgpu/src/renderer.rs
index 6f35e24..a4a910c 100644
--- a/wgpu/src/renderer.rs
+++ b/wgpu/src/renderer.rs
@@ -55,7 +55,7 @@ impl<'a> Layer<'a> {
 impl Renderer {
     fn new(settings: Settings) -> Self {
         let adapter = Adapter::request(&RequestAdapterOptions {
-            power_preference: PowerPreference::Default,
+            power_preference: PowerPreference::HighPerformance,
             backends: BackendBit::all(),
         })
         .expect("Request adapter");

Then my "high performance" (i.e. nvidia) drivers does its magic and everything is flawless.
On Manjaro you can get them with sudo pacman -S nvidia. I don't use nouveau, maybe that's your problem ?

If this issue is to be fixed someday, I think it would be on the wgpu side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants