summaryrefslogtreecommitdiff
path: root/tools/gfx/d3d12/render-d3d12.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/gfx/d3d12/render-d3d12.cpp')
-rw-r--r--tools/gfx/d3d12/render-d3d12.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/gfx/d3d12/render-d3d12.cpp b/tools/gfx/d3d12/render-d3d12.cpp
index 2d8c5fa10..4002450f3 100644
--- a/tools/gfx/d3d12/render-d3d12.cpp
+++ b/tools/gfx/d3d12/render-d3d12.cpp
@@ -219,6 +219,12 @@ public:
{
return (DeviceAddress)m_resource.getResource()->GetGPUVirtualAddress();
}
+
+ virtual SLANG_NO_THROW Result SLANG_MCALL getNativeHandle(NativeHandle* outHandle) override
+ {
+ *outHandle = (uint64_t)m_resource.getResource();
+ return SLANG_OK;
+ }
};
class TextureResourceImpl: public TextureResource
@@ -234,6 +240,12 @@ public:
D3D12Resource m_resource;
D3D12_RESOURCE_STATES m_defaultState;
+
+ virtual SLANG_NO_THROW Result SLANG_MCALL getNativeHandle(NativeHandle* outHandle) override
+ {
+ *outHandle = (uint64_t)m_resource.getResource();
+ return SLANG_OK;
+ }
};
class SamplerStateImpl : public ISamplerState, public ComObject