diff options
| author | Yong He <yonghe@outlook.com> | 2022-02-03 19:17:30 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-02-03 19:17:30 -0800 |
| commit | d06a78d935b2743494d47ed5cd3f36e38ac9c5ac (patch) | |
| tree | 7615fd89cb826f2c463b4a221f19139d3a5d4a9d /tools/gfx/renderer-shared.cpp | |
| parent | 5eb835f0332868fd56ac14ce7560e0ae9cfafec9 (diff) | |
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 <yhe@nvidia.com>
Diffstat (limited to 'tools/gfx/renderer-shared.cpp')
| -rw-r--r-- | tools/gfx/renderer-shared.cpp | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/tools/gfx/renderer-shared.cpp b/tools/gfx/renderer-shared.cpp index 7ba939530..d1cedaa61 100644 --- a/tools/gfx/renderer-shared.cpp +++ b/tools/gfx/renderer-shared.cpp @@ -155,6 +155,13 @@ IResourceView* ResourceViewBase::getInterface(const Guid& guid) return nullptr; } +Result ResourceViewBase::getNativeHandle(InteropHandle* outHandle) +{ + outHandle->api = InteropHandleAPI::Unknown; + outHandle->handleValue = 0; + return SLANG_E_NOT_IMPLEMENTED; +} + ISamplerState* SamplerStateBase::getInterface(const Slang::Guid& guid) { if (guid == GfxGUID::IID_ISlangUnknown || guid == GfxGUID::IID_ISamplerState) @@ -162,6 +169,13 @@ ISamplerState* SamplerStateBase::getInterface(const Slang::Guid& guid) return nullptr; } +Result SamplerStateBase::getNativeHandle(InteropHandle* outHandle) +{ + outHandle->api = InteropHandleAPI::Unknown; + outHandle->handleValue = 0; + return SLANG_E_NOT_IMPLEMENTED; +} + IAccelerationStructure* AccelerationStructureBase::getInterface(const Slang::Guid& guid) { if (guid == GfxGUID::IID_ISlangUnknown || guid == GfxGUID::IID_IResourceView || @@ -264,13 +278,20 @@ IQueryPool* QueryPoolBase::getInterface(const Guid& guid) return nullptr; } -IPipelineState* gfx::PipelineStateBase::getInterface(const Guid& guid) +IPipelineState* PipelineStateBase::getInterface(const Guid& guid) { if (guid == GfxGUID::IID_ISlangUnknown || guid == GfxGUID::IID_IPipelineState) return static_cast<IPipelineState*>(this); return nullptr; } +Result PipelineStateBase::getNativeHandle(InteropHandle* outHandle) +{ + outHandle->api = InteropHandleAPI::Unknown; + outHandle->handleValue = 0; + return SLANG_E_NOT_IMPLEMENTED; +} + void PipelineStateBase::initializeBase(const PipelineStateDesc& inDesc) { desc = inDesc; |
