From d06a78d935b2743494d47ed5cd3f36e38ac9c5ac Mon Sep 17 00:00:00 2001 From: Yong He Date: Thu, 3 Feb 2022 19:17:30 -0800 Subject: Add gfx interop to allow more direct D3D12 usage scenarios. (#2117) * Add gfx interop to allow more direct D3D12 usage scenarios. * Fix compile error in win32. * gfx: Implement IFence::getNativeHandle() on d3d12. * More GFX-D3D interop interface. * Fix cuda. Co-authored-by: Yong He --- tools/gfx/immediate-renderer-base.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'tools/gfx/immediate-renderer-base.cpp') diff --git a/tools/gfx/immediate-renderer-base.cpp b/tools/gfx/immediate-renderer-base.cpp index 91b89c8cf..5632eb600 100644 --- a/tools/gfx/immediate-renderer-base.cpp +++ b/tools/gfx/immediate-renderer-base.cpp @@ -30,6 +30,8 @@ public: return nullptr; } + virtual SLANG_NO_THROW Result SLANG_MCALL resetDescriptorHeaps() override { return SLANG_OK; } + public: CommandWriter m_writer; bool m_hasWriteTimestamps = false; @@ -452,11 +454,9 @@ public: virtual SLANG_NO_THROW void SLANG_MCALL close() override { } - virtual SLANG_NO_THROW Result SLANG_MCALL - getNativeHandle(NativeHandle* outHandle) override + virtual SLANG_NO_THROW Result SLANG_MCALL getNativeHandle(InteropHandle* outHandle) override { - *outHandle = 0; - return SLANG_OK; + return SLANG_FAIL; } void execute() @@ -611,8 +611,7 @@ public: return SLANG_FAIL; } - virtual SLANG_NO_THROW Result SLANG_MCALL - getNativeHandle(NativeHandle* outHandle) override + virtual SLANG_NO_THROW Result SLANG_MCALL getNativeHandle(InteropHandle* outHandle) override { return getRenderer()->m_queue->getNativeHandle(outHandle); } -- cgit v1.2.3