gfx-rs / gfx

[maintenance mode] A low-overhead Vulkan-like GPU API for Rust.
http://gfx-rs.github.io/
Apache License 2.0
5.35k stars 551 forks source link

Hitting `unreachable!` branch in `gfx-backend-vulkan` during swapchain creation, Void Linux, AMD ATI #3727

Closed mitchmindtree closed 3 years ago

mitchmindtree commented 3 years ago

Short info header:

@mattheusroxas hit this unreachable branch while testing nannou for the first time:

https://github.com/gfx-rs/gfx/blob/master/src/backend/vulkan/src/device.rs#L1965

Originally reported here, and confirmed is still occurring on wgpu 0.7 here:

thread 'main' panicked at 'internal error: entered unreachable code: Unexpected result - driver bug? Err(ERROR_UNKNOWN)', /home/mattheus/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/gfx-backend-vulkan-0.7.0/src/device.rs:1953:18
stack backtrace:
   0: rust_begin_unwind
             at /rustc/2fd73fabe469357a12c2c974c140f67e7cdd76d0/library/std/src/panicking.rs:493:5
   1: core::panicking::panic_fmt
             at /rustc/2fd73fabe469357a12c2c974c140f67e7cdd76d0/library/core/src/panicking.rs:92:14
   2: gfx_backend_vulkan::device::<impl gfx_backend_vulkan::Device>::create_swapchain
   3: <gfx_backend_vulkan::window::Surface as gfx_hal::window::PresentationSurface<gfx_backend_vulkan::Backend>>::configure_swapchain
   4: wgpu_core::device::<impl wgpu_core::hub::Global<G>>::device_create_swap_chain
   5: <wgpu::backend::direct::Context as wgpu::Context>::device_create_swap_chain
   6: wgpu::Device::create_swap_chain
   7: nannou::window::Builder::build
   8: nannou::app::SketchBuilder<E>::run
   9: art::main

@mattheusroxas could you maybe also provide the output of the vulkaninfo command line tool here? It might provide some extra info that could be useful.

It is possible that this issue has been fixed on master but is not yet published on crates.io - to test this, you could add a [patch] for gfx-backend-vulkan which points to the master branch here. See here for how to add a [patch] to your nannou project's Cargo.toml. If you no longer get this panic, then it has likely since been fixed.