summaryrefslogtreecommitdiffstats
path: root/tools/gfx/debug-layer/debug-command-buffer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/gfx/debug-layer/debug-command-buffer.cpp')
-rw-r--r--tools/gfx/debug-layer/debug-command-buffer.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/tools/gfx/debug-layer/debug-command-buffer.cpp b/tools/gfx/debug-layer/debug-command-buffer.cpp
index 3785bcd43..aa9c6b8b8 100644
--- a/tools/gfx/debug-layer/debug-command-buffer.cpp
+++ b/tools/gfx/debug-layer/debug-command-buffer.cpp
@@ -30,10 +30,8 @@ void DebugCommandBuffer::encodeRenderCommands(
SLANG_GFX_API_FUNC;
checkCommandBufferOpenWhenCreatingEncoder();
checkEncodersClosedBeforeNewEncoder();
- auto innerRenderPass =
- renderPass ? static_cast<DebugRenderPassLayout*>(renderPass)->baseObject : nullptr;
- auto innerFramebuffer =
- framebuffer ? static_cast<DebugFramebuffer*>(framebuffer)->baseObject : nullptr;
+ auto innerRenderPass = getInnerObj(renderPass);
+ auto innerFramebuffer = getInnerObj(framebuffer);
m_renderCommandEncoder.isOpen = true;
baseObject->encodeRenderCommands(
innerRenderPass, innerFramebuffer, &m_renderCommandEncoder.baseObject);