From 0f2d11dc994c6323b4bfb955b522f3123e731fe0 Mon Sep 17 00:00:00 2001 From: Yong He Date: Wed, 23 Jun 2021 11:33:30 -0700 Subject: [gfx] Add `IBufferResource::getDeviceAddress()`. (#1892) --- tools/gfx/d3d12/render-d3d12.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tools/gfx/d3d12/render-d3d12.cpp') diff --git a/tools/gfx/d3d12/render-d3d12.cpp b/tools/gfx/d3d12/render-d3d12.cpp index e05d68661..79cbe2f9a 100644 --- a/tools/gfx/d3d12/render-d3d12.cpp +++ b/tools/gfx/d3d12/render-d3d12.cpp @@ -198,6 +198,11 @@ public: D3D12Resource m_uploadResource; ///< If the resource can be written to, and is in gpu memory (ie not Memory backed), will have upload resource D3D12_RESOURCE_STATES m_defaultState; + + virtual SLANG_NO_THROW DeviceAddress SLANG_MCALL getDeviceAddress() override + { + return (DeviceAddress)m_resource.getResource()->GetGPUVirtualAddress(); + } }; class TextureResourceImpl: public TextureResource -- cgit v1.2.3