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)] 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 {