From 0253a4f903ba6628172f3593ae580ace83310ce7 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. (cherry picked from commit 20973d1cdcfb35dedf71e0889bb9f1944e464110) # Conflicts: # CHANGELOG.md --- CHANGELOG.md | 1 + wgpu-core/src/command/render.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1da6b95150..d0e97cdfb6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -49,6 +49,7 @@ Bottom level categories: #### General +- Fix profiling with `tracy`. By @waywardmonkeys in [#5988](https://github.com/gfx-rs/wgpu/pull/5988) - Fix function for checking bind compatibility to error instead of panic. By @sagudev [#6012](https://github.com/gfx-rs/wgpu/pull/6012) - Fix crash when dropping the surface after the device. By @wumpf in [#6052](https://github.com/gfx-rs/wgpu/pull/6052) - Fix length of copy in `queue_write_texture`. By @teoxoy in [#6009](https://github.com/gfx-rs/wgpu/pull/6009) diff --git a/wgpu-core/src/command/render.rs b/wgpu-core/src/command/render.rs index b9c760b67d..130c04704c 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 {