summaryrefslogtreecommitdiff
path: root/tools/gfx/d3d12/render-d3d12.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2022-04-27 13:58:55 -0700
committerGitHub <noreply@github.com>2022-04-27 13:58:55 -0700
commitec530b300524635dfe0fd86949b0a4fc5c19a984 (patch)
tree994b88e2da8c8a25098ad179d93e6b41c45af0ee /tools/gfx/d3d12/render-d3d12.cpp
parent50d5a1021623a89df035a1ef78557e0f1152648d (diff)
gfx: Add interop API to control descriptor heap binding. (#2211)
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'tools/gfx/d3d12/render-d3d12.cpp')
-rw-r--r--tools/gfx/d3d12/render-d3d12.cpp7
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;
}