mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-20 20:55:42 +00:00
Ensure barriers are recorded into the right command list for application
This commit is contained in:
@@ -381,7 +381,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_ResourceBarrier(UINT NumBarrier
|
||||
if(!filtered.empty())
|
||||
list->ResourceBarrier((UINT)filtered.size(), &filtered[0]);
|
||||
|
||||
ResourceId cmd = GetResID(list);
|
||||
ResourceId cmd = GetResID(GetResourceManager()->GetWrapper(list));
|
||||
|
||||
// need to re-wrap the barriers
|
||||
for(UINT i = 0; i < num; i++)
|
||||
|
||||
@@ -582,11 +582,25 @@ WrappedID3D12GraphicsCommandList::WrappedID3D12GraphicsCommandList(ID3D12Graphic
|
||||
m_Cmd = m_pDevice->GetQueue()->GetCommandData();
|
||||
}
|
||||
|
||||
if(m_pReal)
|
||||
{
|
||||
bool ret = m_pDevice->GetResourceManager()->AddWrapper(this, m_pReal);
|
||||
if(!ret)
|
||||
RDCERR("Error adding wrapper for ID3D12GraphicsCommandList");
|
||||
}
|
||||
|
||||
m_pDevice->GetResourceManager()->AddCurrentResource(GetResourceID(), this);
|
||||
|
||||
m_pDevice->SoftRef();
|
||||
}
|
||||
|
||||
WrappedID3D12GraphicsCommandList::~WrappedID3D12GraphicsCommandList()
|
||||
{
|
||||
if(m_pReal)
|
||||
m_pDevice->GetResourceManager()->RemoveWrapper(m_pReal);
|
||||
|
||||
m_pDevice->GetResourceManager()->ReleaseCurrentResource(GetResourceID());
|
||||
|
||||
SAFE_RELEASE(m_WrappedDebug.m_pReal);
|
||||
SAFE_RELEASE(m_pReal);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user