From b3dfe383c6d31ff3dbd76dcfb32de8d536382f3e Mon Sep 17 00:00:00 2001 From: lucy96chen <47800040+lucy96chen@users.noreply.github.com> Date: Mon, 4 Oct 2021 09:46:33 -0700 Subject: Get native handles for TextureResource and BufferResource (#1960) * Added getNativeHandle() to TextureResource and BufferResource; Implemented getNativeHandle() in Vulkan and D3D12; Added new unit test files for the aforementioned implementation * Added missing getNativeHandle() implementations to renderer-shared.cpp and CUDA * Finished new getNativeHandle() unit tests for ITextureResource and IBufferResource; Modified ICommandQueue and ICommandBuffer unit tests to call QueryInterface to convert to IUnknown then back and compare resulting pointers for equality * Unit tests updated and pass locally * Cast m_buffer.m_buffer and m_image to uint64_t --- tools/gfx/debug-layer.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tools/gfx/debug-layer.h') diff --git a/tools/gfx/debug-layer.h b/tools/gfx/debug-layer.h index 88e0e5ecd..2f0bc76ce 100644 --- a/tools/gfx/debug-layer.h +++ b/tools/gfx/debug-layer.h @@ -144,6 +144,7 @@ public: virtual SLANG_NO_THROW Type SLANG_MCALL getType() override; virtual SLANG_NO_THROW Desc* SLANG_MCALL getDesc() override; virtual SLANG_NO_THROW DeviceAddress SLANG_MCALL getDeviceAddress() override; + virtual SLANG_NO_THROW Result SLANG_MCALL getNativeHandle(NativeHandle* outHandle) override; }; class DebugTextureResource : public DebugObject @@ -155,6 +156,7 @@ public: ITextureResource* getInterface(const Slang::Guid& guid); virtual SLANG_NO_THROW Type SLANG_MCALL getType() override; virtual SLANG_NO_THROW Desc* SLANG_MCALL getDesc() override; + virtual SLANG_NO_THROW Result SLANG_MCALL getNativeHandle(NativeHandle* outHandle) override; }; class DebugResourceView : public DebugObject -- cgit v1.2.3