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.
This commit is contained in:
baldurk
2016-09-16 17:07:27 +02:00
parent 56eef07de1
commit 29204eb3f5
@@ -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;