Open inodentry opened 5 months ago
FWIW I can reproduce this exact same behavior on x86. This is https://github.com/gfx-rs/wgpu/issues/5505.
Reproduced on nixos x86 with AMD graphiscs. I am using a dev-shell so adding vulkan-loader
to the derivation allowed bevy to use vulkan and fixed the issue.
SystemInfo { os: "Linux 23.10 Ubuntu", kernel: "6.5.0-44-generic", cpu: "Intel(R) Core(TM) i5-2400 CPU @ 3.10GHz", core_count: "4", memory: "11.5 GiB" } AdapterInfo { name: "Mesa Intel(R) HD Graphics 2000 (SNB GT1)", vendor: 32902, device: 0, device_type: IntegratedGpu, driver: "OpenGL", driver_info: "3.3 (Compatibility Profile) Mesa 23.2.1-1ubuntu3.1", backend: Gl }
by default :
cargo run --example 3d_gizmo
bevy choose :
--features x11
WGPU_BACKEND=gl
what works for me :
WGPU_BACKEND=vulkan cargo run --features wayland --example 3d_gizmos
with a terrible performance and this warning :
WARN bevy_render::renderer: The selected adapter is using a driver that only supports software rendering. This is likely to be very slow. See https://bevyengine.org/learn/errors/b0006/
SystemInfo { os: "Linux 23.10 Ubuntu", kernel: "6.5.0-44-generic", cpu: "Intel(R) Core(TM) i5-2400 CPU @ 3.10GHz", core_count: "4", memory: "11.5 GiB" } AdapterInfo { name: "Mesa Intel(R) HD Graphics 2000 (SNB GT1)", vendor: 32902, device: 0, device_type: IntegratedGpu, driver: "OpenGL", driver_info: "3.3 (Compatibility Profile) Mesa 23.2.1-1ubuntu3.1", backend: Gl }
by default :
cargo run --example 3d_gizmo
bevy choose :
--features x11
WGPU_BACKEND=gl
what works for me :
WGPU_BACKEND=vulkan cargo run --features wayland --example 3d_gizmos
with a terrible performance and this warning :
WARN bevy_render::renderer: The selected adapter is using a driver that only supports software rendering. This is likely to be very slow. See https://bevyengine.org/learn/errors/b0006/
I would try this and see if it resolves the issue for you:
sudo add-apt-repository ppa:kisak/kisak-mesa
sudo apt-get update
sudo apt-get upgrade
I was having a similar issue when using an NVIDIA GPU + Vulkan (although I was falling back to llvmpipe) and the solution was to install newer mesa drivers.
sudo add-apt-repository ppa:kisak/kisak-mesa sudo apt-get update sudo apt-get upgrade
I think my device primarily supports Opengl vulkan works terribly.
I did update the mesa drivers although my Ubuntu version is 23.10 kisak-mesa supported versions: `--- Support status ---
Bionic (18.04) - Discontinued - Long term users can use kisak-mesa stable Focal (20.04) - Supported Jammy (22.04) - Supported Mantic (23.10) - End of Life (Removal after 2024-08-14) Noble (24.04) - Preliminary support (Not tested locally) ` and still getting the issue :
ERROR wgpu_hal::gles::egl: EGL 'eglMakeCurrent' code 0x3008: eglMakeCurrent thread 'Compute Task Pool (1)' panicked at /home/marwan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-hal-0.21.1/src/gles/egl.rs:296:14: called
Result::unwrap()on an
Errvalue: BadDisplay note: run with
RUST_BACKTRACE=1environment variable to display a backtrace Encountered a panic in system
bevy_render::view::window::create_surfaces!
Bevy version
I first found the bug when trying the 0.14 release candidates. I ran a git bisect and tracked down the problem to the commit which updated bevy to use winit 0.30. So all Bevy versions that are based on winit 0.30 are affected.
Bevy 0.13.x (and commits before the winit 0.30 update) are not affected.
Relevant system information
Asahi does not have a GPU Vulkan driver yet (though probably will soon…) and this bug makes Bevy unusable.
What you did
Run any bevy app or example.
You need
--features wayland
andWGPU_BACKEND=gl
to run Bevy on Asahi. Bevy chooses CPU Vulkan over OpenGL by default for some reason, and X11 with Gl backend does not work.What went wrong
Bevy immediately crashes with various systems in the Render schedule panicking. The panic comes from
wgpu
unwrapping aBadDisplay
error related to callingeglMakeCurrent
. Something must be going wrong with how winit and wgpu interact in Bevy.Additional Information
winit 0.30.2 is broken on aarch64 and does not compile. winit 0.30.0, 0.30.1, and git main, compile successfully. You have to force cargo to use one of those versions, in order to compile bevy successfully and to reproduce this bug.