From 4753f99655264d98388de305b8099e44442ba49d Mon Sep 17 00:00:00 2001 From: Firestar99 Date: Mon, 23 Dec 2024 15:32:22 +0100 Subject: [PATCH 1/2] add `Allocation::name` getter --- src/vulkan/mod.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/vulkan/mod.rs b/src/vulkan/mod.rs index 1e6a4727..932c90d7 100644 --- a/src/vulkan/mod.rs +++ b/src/vulkan/mod.rs @@ -258,6 +258,10 @@ impl Allocation { pub fn is_null(&self) -> bool { self.chunk_id.is_none() } + + pub fn name(&self) -> Option<&str> { + self.name.as_deref() + } } impl Default for Allocation { From c6cc6dd48fdb7f9ef16ebe3508236ef464a9f357 Mon Sep 17 00:00:00 2001 From: Firestar99 Date: Thu, 26 Dec 2024 13:25:13 +0100 Subject: [PATCH 2/2] add `Allocation::name` getter for d3d12 and metal --- src/d3d12/mod.rs | 4 ++++ src/metal/mod.rs | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/d3d12/mod.rs b/src/d3d12/mod.rs index cb9b29bf..f2b9f6e3 100644 --- a/src/d3d12/mod.rs +++ b/src/d3d12/mod.rs @@ -359,6 +359,10 @@ impl Allocation { pub fn is_null(&self) -> bool { self.chunk_id.is_none() } + + pub fn name(&self) -> Option<&str> { + self.name.as_deref() + } } #[derive(Debug)] diff --git a/src/metal/mod.rs b/src/metal/mod.rs index ad835711..62b8d31f 100644 --- a/src/metal/mod.rs +++ b/src/metal/mod.rs @@ -93,6 +93,10 @@ impl Allocation { fn is_null(&self) -> bool { self.chunk_id.is_none() } + + pub fn name(&self) -> Option<&str> { + self.name.as_deref() + } } #[derive(Clone, Debug)]