Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Oct 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions wgpu-core/src/instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down