summaryrefslogtreecommitdiffstats
path: root/tools/gfx/debug-layer
diff options
context:
space:
mode:
Diffstat (limited to 'tools/gfx/debug-layer')
-rw-r--r--tools/gfx/debug-layer/debug-transient-heap.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/gfx/debug-layer/debug-transient-heap.cpp b/tools/gfx/debug-layer/debug-transient-heap.cpp
index 424a8feb1..5b0219fb7 100644
--- a/tools/gfx/debug-layer/debug-transient-heap.cpp
+++ b/tools/gfx/debug-layer/debug-transient-heap.cpp
@@ -14,7 +14,11 @@ namespace debug
SlangResult DebugTransientResourceHeap::queryInterface(SlangUUID const& uuid, void** outObject)
{
if (uuid == GfxGUID::IID_ISlangUnknown || uuid == GfxGUID::IID_ITransientResourceHeap)
+ {
*outObject = static_cast<ITransientResourceHeap*>(this);
+ addRef();
+ return SLANG_OK;
+ }
if (uuid == GfxGUID::IID_ITransientResourceHeapD3D12)
{
RefPtr<DebugTransientResourceHeapD3D12> result = new DebugTransientResourceHeapD3D12();
@@ -22,10 +26,8 @@ SlangResult DebugTransientResourceHeap::queryInterface(SlangUUID const& uuid, vo
returnComPtr((ITransientResourceHeapD3D12**)outObject, result);
return SLANG_OK;
}
- else
- {
- return baseObject->queryInterface(uuid, outObject);
- }
+
+ return baseObject->queryInterface(uuid, outObject);
}
Result DebugTransientResourceHeap::synchronizeAndReset()