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
This commit is contained in:
teoxoy 2024-06-20 17:38:20 +02:00 committed by Teodor Tanasoaia
parent f2ea30772c
commit 812a562331

View File

@ -850,11 +850,6 @@ impl<A: HalApi> Drop for DestroyedBuffer<A> {
if let Some(raw) = self.raw.take() { if let Some(raw) = self.raw.take() {
resource_log!("Destroy raw Buffer (destroyed) {:?}", self.label()); 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 { unsafe {
use hal::Device; use hal::Device;
self.device.raw().destroy_buffer(raw); self.device.raw().destroy_buffer(raw);
@ -1355,11 +1350,6 @@ impl<A: HalApi> Drop for DestroyedTexture<A> {
if let Some(raw) = self.raw.take() { if let Some(raw) = self.raw.take() {
resource_log!("Destroy raw Texture (destroyed) {:?}", self.label()); 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 { unsafe {
use hal::Device; use hal::Device;
self.device.raw().destroy_texture(raw); self.device.raw().destroy_texture(raw);