diff options
| author | lucy96chen <47800040+lucy96chen@users.noreply.github.com> | 2021-10-04 09:46:33 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-04 09:46:33 -0700 |
| commit | b3dfe383c6d31ff3dbd76dcfb32de8d536382f3e (patch) | |
| tree | 06efb21869df7ccdca6d98ab4217b8bf75dfdd2f /tools/gfx/renderer-shared.h | |
| parent | 35bca4cc432613af3926da3bed217a6baa9cbd26 (diff) | |
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
Diffstat (limited to 'tools/gfx/renderer-shared.h')
| -rw-r--r-- | tools/gfx/renderer-shared.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/gfx/renderer-shared.h b/tools/gfx/renderer-shared.h index 5710bc74e..5df3ee92b 100644 --- a/tools/gfx/renderer-shared.h +++ b/tools/gfx/renderer-shared.h @@ -218,6 +218,7 @@ public: virtual SLANG_NO_THROW IResource::Type SLANG_MCALL getType() SLANG_OVERRIDE; virtual SLANG_NO_THROW IBufferResource::Desc* SLANG_MCALL getDesc() SLANG_OVERRIDE; + virtual SLANG_NO_THROW Result SLANG_MCALL getNativeHandle(NativeHandle* outHandle) SLANG_OVERRIDE; protected: Desc m_desc; @@ -240,6 +241,7 @@ public: virtual SLANG_NO_THROW IResource::Type SLANG_MCALL getType() SLANG_OVERRIDE; virtual SLANG_NO_THROW ITextureResource::Desc* SLANG_MCALL getDesc() SLANG_OVERRIDE; + virtual SLANG_NO_THROW Result SLANG_MCALL getNativeHandle(NativeHandle* outHandle) SLANG_OVERRIDE; protected: Desc m_desc; |
