Fix profiling with tracy. (#5988)

The profiling APIs require a `&str`, but since the label here
is now an `Option<String>`, we must get a `&str` from it.
This commit is contained in:
Bruce Mitchener 2024-07-19 11:56:16 +07:00 committed by GitHub
parent 8aed6ed220
commit 20973d1cdc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 1 deletions

View File

@ -39,6 +39,12 @@ Bottom level categories:
## Unreleased ## Unreleased
### Bug Fixes
#### General
- Fix profiling with `tracy`. By @waywardmonkeys in [#5988](https://github.com/gfx-rs/wgpu/pull/5988)
## 22.0.0 (2024-07-17) ## 22.0.0 (2024-07-17)
### Overview ### Overview

View File

@ -1566,7 +1566,7 @@ impl Global {
profiling::scope!( profiling::scope!(
"CommandEncoder::run_render_pass {}", "CommandEncoder::run_render_pass {}",
base.label.unwrap_or("") base.label.as_deref().unwrap_or("")
); );
let Some(cmd_buf) = pass.parent.as_ref() else { let Some(cmd_buf) = pass.parent.as_ref() else {