From ec530b300524635dfe0fd86949b0a4fc5c19a984 Mon Sep 17 00:00:00 2001 From: Yong He Date: Wed, 27 Apr 2022 13:58:55 -0700 Subject: gfx: Add interop API to control descriptor heap binding. (#2211) Co-authored-by: Yong He --- tools/gfx/d3d12/render-d3d12.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'tools/gfx/d3d12/render-d3d12.cpp') 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 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(this); + if (guid == GfxGUID::IID_ISlangUnknown || guid == GfxGUID::IID_ICommandBuffer || + guid == GfxGUID::IID_ICommandBufferD3D12) + return static_cast(this); return nullptr; } -- cgit v1.2.3