From 20973d1cdcfb35dedf71e0889bb9f1944e464110 Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Fri, 19 Jul 2024 11:56:16 +0700 Subject: [PATCH] Fix profiling with tracy. (#5988) The profiling APIs require a `&str`, but since the label here is now an `Option`, we must get a `&str` from it. --- CHANGELOG.md | 6 ++++++ wgpu-core/src/command/render.rs | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 25a47dd45..149c58cde 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,6 +39,12 @@ Bottom level categories: ## 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) ### Overview diff --git a/wgpu-core/src/command/render.rs b/wgpu-core/src/command/render.rs index b9c760b67..130c04704 100644 --- a/wgpu-core/src/command/render.rs +++ b/wgpu-core/src/command/render.rs @@ -1566,7 +1566,7 @@ impl Global { profiling::scope!( "CommandEncoder::run_render_pass {}", - base.label.unwrap_or("") + base.label.as_deref().unwrap_or("") ); let Some(cmd_buf) = pass.parent.as_ref() else {