Add some single-flush-validate code into D3D12 initial state preparation

This commit is contained in:
baldurk
2019-06-27 10:18:43 +01:00
parent 50266cdee2
commit ada5e55b28
@@ -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);