Make request_adapter() report which backends were tried.

This will help users determine whether the problem is:

* a backend is not statically enabled
* a backend is not dynamically enabled
* no drivers or physical adapters are present for that backend
  (further distinction would be useful here)
* no adapters met the required criteria

There are deficiencies in the reporting of WebGPU vs. WebGL support.
Those would best be fixed by also fixing the mutual exclusion of those
backends.
This commit is contained in:
Kevin Reid authored and Nicolas Silva committed 2025-03-14 11:45:49 +01:00
1 parent a369bfa8d1
commit fbe005f11a
15 files changed
+381 -142

No files matched your search

@@ -43,7 +43,7 @@ impl InstanceInterface for CustomInstance {
&self,
_options: &wgpu::RequestAdapterOptions<'_, '_>,
) -> std::pin::Pin<Box<dyn RequestAdapterFuture>> {
Box::pin(std::future::ready(Some(DispatchAdapter::custom(
Box::pin(std::future::ready(Ok(DispatchAdapter::custom(
CustomAdapter(self.0.clone()),
))))
}