From 29204eb3f5a506ae6f3b496594523e89bbd02077 Mon Sep 17 00:00:00 2001 From: baldurk Date: Fri, 16 Sep 2016 17:07:27 +0200 Subject: [PATCH] Add parameters to Reset() as framerefs not parents * This ensures that the resources are referenced and pulled into the final capture - parents of the list record will get lost. --- renderdoc/driver/d3d12/d3d12_command_list_wrap.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/renderdoc/driver/d3d12/d3d12_command_list_wrap.cpp b/renderdoc/driver/d3d12/d3d12_command_list_wrap.cpp index 6829735ad..49df4b5ce 100644 --- a/renderdoc/driver/d3d12/d3d12_command_list_wrap.cpp +++ b/renderdoc/driver/d3d12/d3d12_command_list_wrap.cpp @@ -287,10 +287,13 @@ HRESULT WrappedID3D12GraphicsCommandList::Reset(ID3D12CommandAllocator *pAllocat m_ListRecord->AddChunk(scope.Get()); } - // add allocator and initial state (if there is one) as parents - m_ListRecord->AddParent(GetRecord(pAllocator)); + // add allocator and initial state (if there is one) as frame refs. We can't add + // them as parents of the list record because it won't get directly referenced + // (just the baked commands), and we can't parent them onto the baked commands + // because that would pull them into the capture section. + m_ListRecord->MarkResourceFrameReferenced(GetResID(pAllocator), eFrameRef_Read); if(pInitialState) - m_ListRecord->AddParent(GetRecord(pInitialState)); + m_ListRecord->MarkResourceFrameReferenced(GetResID(pInitialState), eFrameRef_Read); if(firstTime) return S_OK;