From bbf824767d07e52744abb55e67f8d677e6012c8f Mon Sep 17 00:00:00 2001 From: teoxoy <28601907+teoxoy@users.noreply.github.com> Date: Thu, 20 Jun 2024 20:35:36 +0200 Subject: [PATCH] remove IDs from `Destroyed{Buffer,Texture}` --- wgpu-core/src/resource.rs | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/wgpu-core/src/resource.rs b/wgpu-core/src/resource.rs index 012072a97..abf5cc480 100644 --- a/wgpu-core/src/resource.rs +++ b/wgpu-core/src/resource.rs @@ -765,7 +765,6 @@ impl Buffer { raw: Some(raw), device: Arc::clone(&self.device), submission_index: self.info.submission_index(), - id: self.info.id.unwrap(), tracker_index: self.info.tracker_index(), label: self.info.label.clone(), bind_groups, @@ -832,7 +831,6 @@ pub struct DestroyedBuffer { raw: Option, device: Arc>, label: String, - pub(crate) id: BufferId, pub(crate) tracker_index: TrackerIndex, pub(crate) submission_index: u64, bind_groups: Vec>>, @@ -840,11 +838,7 @@ pub struct DestroyedBuffer { impl DestroyedBuffer { pub fn label(&self) -> &dyn Debug { - if !self.label.is_empty() { - return &self.label; - } - - &self.id + &self.label } } @@ -1144,7 +1138,6 @@ impl Texture { device: Arc::clone(&self.device), tracker_index: self.info.tracker_index(), submission_index: self.info.submission_index(), - id: self.info.id.unwrap(), label: self.info.label.clone(), })) }; @@ -1328,18 +1321,13 @@ pub struct DestroyedTexture { bind_groups: Vec>>, device: Arc>, label: String, - pub(crate) id: TextureId, pub(crate) tracker_index: TrackerIndex, pub(crate) submission_index: u64, } impl DestroyedTexture { pub fn label(&self) -> &dyn Debug { - if !self.label.is_empty() { - return &self.label; - } - - &self.id + &self.label } }