diff options
Diffstat (limited to 'tools/gfx/d3d12')
| -rw-r--r-- | tools/gfx/d3d12/render-d3d12.cpp | 7 | ||||
| -rw-r--r-- | tools/gfx/d3d12/render-d3d12.h | 6 |
2 files changed, 7 insertions, 6 deletions
diff --git a/tools/gfx/d3d12/render-d3d12.cpp b/tools/gfx/d3d12/render-d3d12.cpp index 98f56958c..e6168f17c 100644 --- a/tools/gfx/d3d12/render-d3d12.cpp +++ b/tools/gfx/d3d12/render-d3d12.cpp @@ -6408,10 +6408,11 @@ RefPtr<BufferResource> ShaderTableImpl::createDeviceBuffer( // a `CommandBuffer` created from the heap. We need to break the cycle upon // the public reference count of a command buffer dropping to 0. -ICommandBuffer* CommandBufferImpl::getInterface(const Guid& guid) +ICommandBufferD3D12* CommandBufferImpl::getInterface(const Guid& guid) { - if (guid == GfxGUID::IID_ISlangUnknown || guid == GfxGUID::IID_ICommandBuffer) - return static_cast<ICommandBuffer*>(this); + if (guid == GfxGUID::IID_ISlangUnknown || guid == GfxGUID::IID_ICommandBuffer || + guid == GfxGUID::IID_ICommandBufferD3D12) + return static_cast<ICommandBufferD3D12*>(this); return nullptr; } diff --git a/tools/gfx/d3d12/render-d3d12.h b/tools/gfx/d3d12/render-d3d12.h index 5dae6a383..c8def3217 100644 --- a/tools/gfx/d3d12/render-d3d12.h +++ b/tools/gfx/d3d12/render-d3d12.h @@ -1641,7 +1641,7 @@ public: #endif class CommandBufferImpl - : public ICommandBuffer + : public ICommandBufferD3D12 , public ComObject { public: @@ -1650,7 +1650,7 @@ public: // the public reference count of a command buffer dropping to 0. SLANG_COM_OBJECT_IUNKNOWN_ALL - ICommandBuffer* getInterface(const Guid& guid); + ICommandBufferD3D12* getInterface(const Guid& guid); virtual void comFree() override { m_transientHeap.breakStrongReference(); } virtual SLANG_NO_THROW Result SLANG_MCALL getNativeHandle(InteropHandle* handle) override; @@ -1670,7 +1670,7 @@ public: void bindDescriptorHeaps(); - void invalidateDescriptorHeapBinding() { m_descriptorHeapsBound = false; } + virtual SLANG_NO_THROW void SLANG_MCALL invalidateDescriptorHeapBinding() override { m_descriptorHeapsBound = false; } void reinit(); |
