diff options
Diffstat (limited to 'tools/gfx/d3d12/render-d3d12.cpp')
| -rw-r--r-- | tools/gfx/d3d12/render-d3d12.cpp | 7 |
1 files changed, 4 insertions, 3 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; } |
