From 7708d205cb186f2b95d8daa2d8e0c655488fc34a Mon Sep 17 00:00:00 2001 From: Yong He Date: Wed, 28 Sep 2022 10:40:47 -0700 Subject: Fix gfx debug layer crashes. (#2416) Co-authored-by: Yong He --- tools/gfx/debug-layer/debug-command-queue.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools/gfx/debug-layer/debug-command-queue.cpp') diff --git a/tools/gfx/debug-layer/debug-command-queue.cpp b/tools/gfx/debug-layer/debug-command-queue.cpp index c196fa06a..d094f3438 100644 --- a/tools/gfx/debug-layer/debug-command-queue.cpp +++ b/tools/gfx/debug-layer/debug-command-queue.cpp @@ -27,8 +27,8 @@ void DebugCommandQueue::executeCommandBuffers(GfxCount count, ICommandBuffer* co for (GfxIndex i = 0; i < count; i++) { auto cmdBufferIn = commandBuffers[i]; - auto cmdBufferImpl = static_cast(cmdBufferIn); - auto innerCmdBuffer = cmdBufferImpl->baseObject.get(); + auto cmdBufferImpl = getDebugObj(cmdBufferIn); + auto innerCmdBuffer = getInnerObj(cmdBufferIn); innerCommandBuffers.add(innerCmdBuffer); if (cmdBufferImpl->isOpen) { -- cgit v1.2.3