How to run a Bevy app with default plugins without a GPU?
Asked Answered
D

0

11

My laptop doesn't have a dedicated GPU. I run elementary OS 5 on this laptop, which has an integrated GPU. When I try running my beginner's Bevy app,

use bevy::prelude::*;

fn main() {
    App::build()
        .add_default_plugins()
        .run();
}

I get the following error -

thread 'main' panicked at 'Unable to find a GPU! Make sure you have installed required drivers!', /home/actuday/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_wgpu-0.1.3/src/wgpu_renderer.rs:22:23

I have installed and upgraded the drivers for my GPU. Output of

glxinfo | grep "OpenGL"

contains the line

OpenGL version string: 4.6 (Compatibility Profile) Mesa 20.3.0-devel (git-98e866c 2020-09-03 bionic-oibaf-ppa)

and

OpenGL renderer string: Mesa Intel(R) UHD Graphics 620 (KBL GT2)

I installed vulkan and the error is now replaced with -

     Running `target/debug/bevy_app`
WARNING: vallium/llvmpipe is not a conformant vulkan implementation, testing use only.
INTEL-MESA: warning: Performance support disabled, consider sysctl dev.i915.perf_stream_paranoid=0

thread 'main' panicked at 'Failed to acquire next swap chain texture!', /home/actuday/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_wgpu-0.1.3/src/renderer/wgpu_render_resource_context.rs:291:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Dogfight answered 3/9, 2020 at 7:57 Comment(13)
Are you sure you have your gpu drivers installed?Ulent
Every pc has some form of GPU. (Unless you still live in the 80's of course) Make sure to install the Intel drivers for the Intel® UHD Graphics 620. elementaryos.stackexchange.com/a/21308Norvol
Thanks for the heads up. I've updated my question.Dogfight
bevy is using PRIMARY backend bit with is D12 + Vulcan. GL is is not supported right now docs.rs/bevy_wgpu/0.1.3/src/bevy_wgpu/wgpu_renderer.rs.html#21 and docs.rs/wgpu/0.6.0/wgpu/struct.BackendBit.htmlAskari
You can use this list of backends to find out what is supported in your machine gist.github.com/koutoftimer/694c828b20562dc5489a89dd9e44674fAskari
Did you install mesa-vulkan-drivers? These did help with my Intel notebook on Debian.Aloysius
@Aloysius I have done that. Running vulkan-smoketest is error free with an FPS of 273 the last time I checked.Dogfight
@Askari I've got Vulkan installed, as confirmed by vulkaninfo (output of which is at this paste bin - pastebin.pl/view/0fddc576). Forgive my ignorance, but I don't know what D12 is, and Google didn't turn up anything sensible either.Dogfight
D12 seems to mean DX12 (Microsoft DirectX) and should be irrelevant for your case.Aloysius
Arun, try code from gist, it uses same wgpu crate as you do in bevy. If wgpu unable to recognize that you have installed vulkan, than you know where to put an issue.Askari
@Askari You're right about this not being Bevy's fault. I cloned the wgpu source and tried to run the cube example. I got a whole lot of errors, then the program segfault-ed, my mouse stopped working and I had to reboot to make my computer useful again. I guess the next step would be to create a GitHub issue with wgpu. Thanks for your help.Dogfight
@Askari Ball's back in your court.The issue running the wgpu example got resolved. You can see the GitHub issue I created here - github.com/gfx-rs/wgpu-rs/issues/560. So I can run wgpu examples okay.Dogfight
According to the Bevy Website, Bevy 0.10 supports the OpenGL backend out of the box: bevyengine.org/news/bevy-0-10/…Moose

© 2022 - 2024 — McMap. All rights reserved.