Fix missing binding in wgpu-core/src/instance.rs when profiling has a backend enabled (#6422)

This commit is contained in:
cybersoulK 2024-10-17 17:15:25 -07:00 committed by GitHub
parent 94e040bc8a
commit a8214b67f6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -293,12 +293,14 @@ impl Instance {
api_log!("Instance::enumerate_adapters");
let mut adapters = Vec::new();
for (_, instance) in self
for (_backend, instance) in self
.instance_per_backend
.iter()
.filter(|(backend, _)| backends.contains(Backends::from(*backend)))
{
profiling::scope!("enumerating", &*format!("{:?}", backend));
// NOTE: We might be using `profiling` without any features. The empty backend of this
// macro emits no code, so unused code linting changes depending on the backend.
profiling::scope!("enumerating", &*format!("{:?}", _backend));
let hal_adapters = unsafe { instance.enumerate_adapters(None) };
for raw in hal_adapters {