-
I've asked this on discord already so I'll just copy paste. Hi. I have a reported problem with the vulkan backend #3780 (comment) . Is there any way to force bevy and wgpu to use a different backend ? Or force them to enable the semaphore feature mentioned in the error trace ? I really want to continue my bevy journey and this is a blocker for me 🙂 |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
Yes! You ought to be able to insert a Example demonstrating how to insert the resource: https://github.com/bevyengine/bevy/blob/main/examples/app/headless_defaults.rs The list of wgpu backends: https://wgpu.rs/doc/wgpu/struct.Backends.html |
Beta Was this translation helpful? Give feedback.
-
You can set it this way with simple variable and resource. Source : here // Setup native Graphics API for each platform.
let platform_api =
if cfg!(target_os = "windows") {
Backends::DX12
} else if cfg!(target_os = "macos") {
Backends::METAL
} else if cfg!(target_os = "linux") {
Backends::VULKAN
} else {
panic!("Unsupported platform!");
};
// Resources
app
.insert_resource(
WgpuOptions {
backends: Some(platform_api),
..Default::default()
}
); |
Beta Was this translation helpful? Give feedback.
-
@ickk @heavyrain266 Thank you both. I've marked the first as an answer cause it was first, but thanks for the more detailed example @heavyrain266 |
Beta Was this translation helpful? Give feedback.
-
Updated answer for bevy 0.15.0: App::new()
.add_plugins(DefaultPlugins.set(RenderPlugin {
render_creation: RenderCreation::Automatic(WgpuSettings {
#[cfg(target_os = "windows")]
backends: Some(Backends::DX12),
..default()
}),
..default()
})) |
Beta Was this translation helpful? Give feedback.
Yes! You ought to be able to insert a
WgpuOptions
resource that selects a specific wgpu backend.Example demonstrating how to insert the resource: https://github.com/bevyengine/bevy/blob/main/examples/app/headless_defaults.rs
The list of wgpu backends: https://wgpu.rs/doc/wgpu/struct.Backends.html