diff --git a/src/ComputeSharp/Graphics/Extensions/Interop/ID3D12AllocationExtensions.cs b/src/ComputeSharp/Graphics/Extensions/Interop/ID3D12AllocationExtensions.cs
new file mode 100644
index 00000000..ff1a050b
--- /dev/null
+++ b/src/ComputeSharp/Graphics/Extensions/Interop/ID3D12AllocationExtensions.cs
@@ -0,0 +1,29 @@
+using ComputeSharp.Core.Extensions;
+using ComputeSharp.Interop.Allocation;
+using TerraFX.Interop.DirectX;
+using TerraFX.Interop.Windows;
+
+namespace ComputeSharp.Graphics.Extensions;
+
+///
+/// A with extensions for the type.
+///
+internal static unsafe class ID3D12AllocationExtensions
+{
+ ///
+ /// Gets the underlying for a given object.
+ ///
+ /// The input object.
+ /// An reference for the current object.
+ ///
+ /// The returned resource should not be used after the current allocation instance has been released.
+ ///
+ public static ComPtr GetD3D12Resource(this ref ID3D12Allocation allocation)
+ {
+ using ComPtr d3D12Resource = default;
+
+ allocation.GetD3D12Resource(d3D12Resource.GetAddressOf()).Assert();
+
+ return d3D12Resource.Move();
+ }
+}
\ No newline at end of file