Skip to content

Commit

Permalink
Helpful error message on empty backend
Browse files Browse the repository at this point in the history
  • Loading branch information
kvark committed Mar 19, 2019
1 parent 9f70c2e commit 508b724
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion wgpu-native/src/instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,9 @@ pub fn instance_get_adapter(instance_id: InstanceId, desc: &AdapterDescriptor) -
PowerPreference::LowPower => low.or(high),
PowerPreference::HighPerformance | PowerPreference::Default => high.or(low),
};
some.or(other).unwrap()
some
.or(other)
.expect("No adapters found. Please enable the feature for one of the graphics backends: vulkan, metal, dx12, dx11")
}

#[cfg(feature = "local")]
Expand Down

0 comments on commit 508b724

Please sign in to comment.