From 812a562331228a5f53a29d6d3c0c47dd36fe5c12 Mon Sep 17 00:00:00 2001 From: teoxoy <28601907+teoxoy@users.noreply.github.com> Date: Thu, 20 Jun 2024 17:38:20 +0200 Subject: [PATCH] remove tracing from `Destroyed{Buffer,Texture}` drop impl we already trace buffer drop and destroy in the corresponding `Global` methods so we might end up with double drop/destroy actions --- wgpu-core/src/resource.rs | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/wgpu-core/src/resource.rs b/wgpu-core/src/resource.rs index 66cfc9f4e..fadc077d6 100644 --- a/wgpu-core/src/resource.rs +++ b/wgpu-core/src/resource.rs @@ -850,11 +850,6 @@ impl Drop for DestroyedBuffer { if let Some(raw) = self.raw.take() { resource_log!("Destroy raw Buffer (destroyed) {:?}", self.label()); - #[cfg(feature = "trace")] - if let Some(t) = self.device.trace.lock().as_mut() { - t.add(trace::Action::DestroyBuffer(self.id)); - } - unsafe { use hal::Device; self.device.raw().destroy_buffer(raw); @@ -1355,11 +1350,6 @@ impl Drop for DestroyedTexture { if let Some(raw) = self.raw.take() { resource_log!("Destroy raw Texture (destroyed) {:?}", self.label()); - #[cfg(feature = "trace")] - if let Some(t) = self.device.trace.lock().as_mut() { - t.add(trace::Action::DestroyTexture(self.id)); - } - unsafe { use hal::Device; self.device.raw().destroy_texture(raw);