mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-28 04:41:07 +00:00
Add some single-flush-validate code into D3D12 initial state preparation
This commit is contained in:
@@ -157,6 +157,14 @@ bool D3D12ResourceManager::Prepare_InitialState(ID3D12DeviceChild *res)
|
||||
|
||||
m_Device->Evict(1, &pageable);
|
||||
}
|
||||
else
|
||||
{
|
||||
#if ENABLED(SINGLE_FLUSH_VALIDATE)
|
||||
m_Device->CloseInitialStateList();
|
||||
m_Device->ExecuteLists(NULL, true);
|
||||
m_Device->FlushLists(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
SetInitialContents(GetResID(r), D3D12InitialContents(copyDst));
|
||||
return true;
|
||||
@@ -344,6 +352,14 @@ bool D3D12ResourceManager::Prepare_InitialState(ID3D12DeviceChild *res)
|
||||
if(nonresident)
|
||||
m_Device->Evict(1, &pageable);
|
||||
}
|
||||
else
|
||||
{
|
||||
#if ENABLED(SINGLE_FLUSH_VALIDATE)
|
||||
m_Device->CloseInitialStateList();
|
||||
m_Device->ExecuteLists(NULL, true);
|
||||
m_Device->FlushLists(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
SAFE_RELEASE(arrayTexture);
|
||||
SAFE_DELETE_ARRAY(layouts);
|
||||
|
||||
Reference in New Issue
Block a user