From 81e68753128cc6e25461cf4e72070515aed2f1aa Mon Sep 17 00:00:00 2001 From: Kevin Reid Date: Thu, 10 Jul 2025 09:39:06 -0700 Subject: [PATCH] Fix undeclared `base` in profiling scopes. This would cause compilation to fail if profiling was enabled. --- CHANGELOG.md | 4 ++++ wgpu-core/src/command/compute.rs | 2 +- wgpu-core/src/command/render.rs | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 82d6698c0..082dba39d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,6 +40,10 @@ Bottom level categories: ## Unreleased +### Bug Fixes + +- Fixed build error occurring when the `profiling` dependency is configured to have profiling active. By @kpreid in [#7916](https://github.com/gfx-rs/wgpu/pull/7916). + ## v26.0.0 (2025-07-09) ### Major Features diff --git a/wgpu-core/src/command/compute.rs b/wgpu-core/src/command/compute.rs index 361a5990f..e6793a32d 100644 --- a/wgpu-core/src/command/compute.rs +++ b/wgpu-core/src/command/compute.rs @@ -492,7 +492,7 @@ impl Global { let pass_scope = PassErrorScope::Pass; profiling::scope!( "CommandEncoder::run_compute_pass {}", - base.label.as_deref().unwrap_or("") + pass.base.label.as_deref().unwrap_or("") ); let cmd_buf = pass.parent.take().ok_or(EncoderStateError::Ended)?; diff --git a/wgpu-core/src/command/render.rs b/wgpu-core/src/command/render.rs index f9cccbff3..18cf03db7 100644 --- a/wgpu-core/src/command/render.rs +++ b/wgpu-core/src/command/render.rs @@ -1804,7 +1804,7 @@ impl Global { let pass_scope = PassErrorScope::Pass; profiling::scope!( "CommandEncoder::run_render_pass {}", - base.label.as_deref().unwrap_or("") + pass.base.label.as_deref().unwrap_or("") ); let cmd_buf = pass.parent.take().ok_or(EncoderStateError::Ended)?;