Apply initial contents on first read after setting up image layouts

This commit is contained in:
baldurk
2016-02-07 18:49:05 +01:00
parent dd7e2ee568
commit 78913345f1
+10 -7
View File
@@ -1121,14 +1121,7 @@ void WrappedVulkan::ReadLogInitialisation()
RenderDoc::Inst().SetProgress(FileInitialRead, float(m_pSerialiser->GetOffset())/float(m_pSerialiser->GetSize()));
if(context == CAPTURE_SCOPE)
{
GetResourceManager()->ApplyInitialContents();
SubmitCmds();
FlushQ();
ContextReplayLog(READING, 0, 0, false);
}
uint64_t offset2 = m_pSerialiser->GetOffset();
@@ -1182,6 +1175,16 @@ void WrappedVulkan::ContextReplayLog(LogState readType, uint32_t startEventID, u
ObjDisp(GetDev())->DeviceWaitIdle(Unwrap(GetDev()));
// apply initial contents here so that images are in the right layout
// (not undefined)
if(readType == READING)
{
GetResourceManager()->ApplyInitialContents();
SubmitCmds();
FlushQ();
}
m_pSerialiser->PopContext(header);
m_RootEvents.clear();