forked from bevyengine/bevy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Print warning when using llvmpipe (bevyengine#13780)
# Objective Numerous people have been confused that Bevy runs slowly, when the reason is that the `llvmpipe` software rendered is being used. ## Solution Printing a warning could reduce the confusion.
- Loading branch information
Showing
2 changed files
with
40 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# B0006 | ||
|
||
A runtime warning. | ||
|
||
Bevy's renderer is designed to be used with hardware acceleration. When initializing the renderer, Bevy will print an `AdapterInfo` line. If the driver in the `AdapterInfo` is indicated to be a software renderer, then the driver does not support hardware acceleration and Bevy will most likely be slow. | ||
|
||
## Possible solutions | ||
|
||
- Update your graphics driver. Your driver could simply be outdated. | ||
- It is possible that the hardware itself is too old. | ||
- You could try using a different backend for the `RenderPlugin`, for example the OpenGL backend. However, please be aware that this could reduce the renderer's performance on other systems that don't have this problem. Here's an example of how to do this: | ||
|
||
```rust | ||
fn main() { | ||
App::new() | ||
.add_plugins( | ||
DefaultPlugins.set(RenderPlugin { | ||
render_creation: WgpuSettings { | ||
backends: Some(Backends::GL), | ||
..default() | ||
} | ||
.into(), | ||
..default() | ||
}), | ||
) | ||
.run(); | ||
} | ||
``` | ||
|
||
The backend can also be configured using environment variables, by setting `WGPU_BACKEND=[backend]` on Linux/Mac or `set WGPU_BACKEND=[backend]` on Windows, where `[backend]` is one of `vulkan`, `metal`, `dx12`, or `gl`. |