From d30c02ffa38e658108f87b866d5f999c29bf6e3c Mon Sep 17 00:00:00 2001 From: teoxoy <28601907+teoxoy@users.noreply.github.com> Date: Thu, 20 Jun 2024 18:45:07 +0200 Subject: [PATCH] use `.error_ident()` for resource logging --- wgpu-core/src/track/buffer.rs | 8 ++++---- wgpu-core/src/track/stateless.rs | 8 ++++---- wgpu-core/src/track/texture.rs | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/wgpu-core/src/track/buffer.rs b/wgpu-core/src/track/buffer.rs index 4b75321f9..093498f9e 100644 --- a/wgpu-core/src/track/buffer.rs +++ b/wgpu-core/src/track/buffer.rs @@ -304,8 +304,8 @@ impl ResourceTracker for BufferTracker { //so it's already been released from user and so it's not inside Registry\Storage if existing_ref_count <= 2 { resource_log!( - "BufferTracker::remove_abandoned: removing {:?}", - self.metadata.get_resource_unchecked(index).as_info().id() + "BufferTracker::remove_abandoned: removing {}", + self.metadata.get_resource_unchecked(index).error_ident() ); self.metadata.remove(index); @@ -313,8 +313,8 @@ impl ResourceTracker for BufferTracker { } resource_log!( - "BufferTracker::remove_abandoned: not removing {:?}, ref count {}", - self.metadata.get_resource_unchecked(index).as_info().id(), + "BufferTracker::remove_abandoned: not removing {}, ref count {}", + self.metadata.get_resource_unchecked(index).error_ident(), existing_ref_count ); diff --git a/wgpu-core/src/track/stateless.rs b/wgpu-core/src/track/stateless.rs index 734f51c01..200c743d0 100644 --- a/wgpu-core/src/track/stateless.rs +++ b/wgpu-core/src/track/stateless.rs @@ -86,9 +86,9 @@ impl ResourceTracker for StatelessTracker { //so it's already been released from user and so it's not inside Registry\Storage if existing_ref_count <= 2 { resource_log!( - "StatelessTracker<{}>::remove_abandoned: removing {:?}", + "StatelessTracker<{}>::remove_abandoned: removing {}", T::TYPE, - self.metadata.get_resource_unchecked(index).as_info().id() + self.metadata.get_resource_unchecked(index).error_ident() ); self.metadata.remove(index); @@ -96,9 +96,9 @@ impl ResourceTracker for StatelessTracker { } resource_log!( - "StatelessTracker<{}>::remove_abandoned: not removing {:?}, ref count {}", + "StatelessTracker<{}>::remove_abandoned: not removing {}, ref count {}", T::TYPE, - self.metadata.get_resource_unchecked(index).as_info().id(), + self.metadata.get_resource_unchecked(index).error_ident(), existing_ref_count ); diff --git a/wgpu-core/src/track/texture.rs b/wgpu-core/src/track/texture.rs index bd5b2a93b..b8e3ccce6 100644 --- a/wgpu-core/src/track/texture.rs +++ b/wgpu-core/src/track/texture.rs @@ -428,8 +428,8 @@ impl ResourceTracker for TextureTracker { //so it's already been released from user and so it's not inside Registry\Storage if existing_ref_count <= 2 { resource_log!( - "TextureTracker::remove_abandoned: removing {:?}", - self.metadata.get_resource_unchecked(index).as_info().id() + "TextureTracker::remove_abandoned: removing {}", + self.metadata.get_resource_unchecked(index).error_ident() ); self.start_set.complex.remove(&index); @@ -439,8 +439,8 @@ impl ResourceTracker for TextureTracker { } resource_log!( - "TextureTracker::remove_abandoned: not removing {:?}, ref count {}", - self.metadata.get_resource_unchecked(index).as_info().id(), + "TextureTracker::remove_abandoned: not removing {}, ref count {}", + self.metadata.get_resource_unchecked(index).error_ident(), existing_ref_count );