Replies: 4 comments
|
What version of macOS? I had a mid 2014 macbook pro that supported metal 2 well enough that wgpu worked. You do need to be on a newer version of macOS(High Sierra or later). |
|
Ah, I appear to be on regular Low Sierra, 10.12.4. If I update it what all should I expect to break? Is it even possible to update only one OS version at this point? |
|
I'm not sure if you can update to an older version instead of latest. If you have any 32 bit applications you wont be able to run those anymore is probably the biggest thing. |
|
System requirements checking is useful for shipping polished releases. Here's how to implement it in Bevy: use bevy::prelude::*;
use bevy::render::renderer::RenderAdapterInfo;
fn check_system_requirements(
adapter_info: Option<Res<RenderAdapterInfo>>,
) {
if let Some(info) = adapter_info {
println!("GPU: {} ({})", info.name, info.backend);
// Example: warn if software renderer
if info.name.to_lowercase().contains("llvmpipe")
|| info.name.to_lowercase().contains("software")
{
warn!("Software renderer detected — performance will be degraded");
}
}
}
// Minimum version checks via wgpu feature detection
fn check_wgpu_features(
render_device: Option<Res<bevy::render::renderer::RenderDevice>>,
) {
if let Some(device) = render_device {
let features = device.features();
if !features.contains(wgpu::Features::TEXTURE_COMPRESSION_BC) {
warn!("BC texture compression not supported — using uncompressed textures");
}
let limits = device.limits();
if limits.max_texture_dimension_2d < 4096 {
warn!("Max texture dimension is {}px — some assets may not load",
limits.max_texture_dimension_2d);
}
}
}
// Register as startup system
fn main() {
App::new()
.add_plugins(DefaultPlugins)
.add_systems(Startup, (check_system_requirements, check_wgpu_features))
.run();
}For more comprehensive checks before the window opens, you can query // Pre-app adapter query
let instance = wgpu::Instance::default();
let adapters: Vec<_> = instance.enumerate_adapters(wgpu::Backends::all()).collect();
for adapter in &adapters {
let info = adapter.get_info();
println!("Available adapter: {} ({:?})", info.name, info.backend);
}
if adapters.is_empty() {
eprintln!("No GPU adapters found. Please install graphics drivers.");
std::process::exit(1);
}This lets you show a friendly error before the window even appears, rather than panicking inside the engine. |
Uh oh!
There was an error while loading. Please reload this page.
Trying bevy on a 2015 MacBook Air, half the examples work, and half of them* error with
Failed to create pipeline: Unsupported usage: Implementation specific error occurred. Digging slightly deeper, a similar wgpu example reports the issue is missing SAMPLED_TEXTURE_BINDING_ARRAY capability - is that information available to bevy, to be reported instead of the opaque "implementation specific error"? (And is this in fact an issue of outdated hardware?)*sprite_sheet texture_atlas font_atlas_debug button text ui scene breakout
All reactions