From ecbbd989508223f8c2bc014fc0341420191b1232 Mon Sep 17 00:00:00 2001 From: baldurk Date: Mon, 16 Jun 2014 21:10:20 +0100 Subject: [PATCH] Don't bake DrawcallTreeNodes too early, just copy children across. * Fixes markers within deferred contexts from not showing their children in the event browser (although they would still replay the events) --- renderdoc/driver/d3d11/d3d11_context_wrap.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/renderdoc/driver/d3d11/d3d11_context_wrap.cpp b/renderdoc/driver/d3d11/d3d11_context_wrap.cpp index f92e13e8c..58c77fb0c 100644 --- a/renderdoc/driver/d3d11/d3d11_context_wrap.cpp +++ b/renderdoc/driver/d3d11/d3d11_context_wrap.cpp @@ -4047,10 +4047,13 @@ bool WrappedID3D11DeviceContext::Serialise_ExecuteCommandList(ID3D11CommandList draw.debugMessages = debugMessages; - if(m_CmdLists.find(cmdList) != m_CmdLists.end()) - draw.children = m_CmdLists[cmdList].Bake(); - AddDrawcall(draw, true); + + auto cmdDrawChildren = m_CmdLists.find(cmdList); + + if(!m_DrawcallStack.empty() && !m_DrawcallStack.back()->children.empty() && + cmdDrawChildren != m_CmdLists.end()) + m_DrawcallStack.back()->children.back().children = cmdDrawChildren->second.children; } return true;