mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-06 23:00:59 +00:00
Fixes for coherent persistent maps and multiple frame capture
This commit is contained in:
@@ -619,6 +619,12 @@ void WrappedVulkan::FinishCapture()
|
||||
//m_SuccessfulCapture = false;
|
||||
|
||||
ObjDisp(GetDev())->DeviceWaitIdle(Unwrap(GetDev()));
|
||||
|
||||
{
|
||||
SCOPED_LOCK(m_CurrentMapsLock);
|
||||
for(auto it = m_CurrentMaps.begin(); it != m_CurrentMaps.end(); ++it)
|
||||
SAFE_DELETE_ARRAY(it->second.refData);
|
||||
}
|
||||
}
|
||||
|
||||
void WrappedVulkan::StartFrameCapture(void *dev, void *wnd)
|
||||
|
||||
@@ -457,10 +457,18 @@ VkResult WrappedVulkan::vkQueueSubmit(
|
||||
vkFlushMappedMemoryRanges(it->second.device, 1, &range);
|
||||
}
|
||||
|
||||
GetResourceManager()->MarkPendingDirty(it->first);
|
||||
|
||||
// allocate ref data so we can compare next time to minimise serialised data
|
||||
if(it->second.refData == NULL)
|
||||
it->second.refData = new byte[(size_t)it->second.mapSize];
|
||||
memcpy(it->second.refData, it->second.mappedPtr, (size_t)it->second.mapSize);
|
||||
|
||||
{
|
||||
SCOPED_LOCK(m_CurrentMapsLock);
|
||||
m_CurrentMaps[it->first].mapFlushed = false;
|
||||
m_CurrentMaps[it->first].refData = it->second.refData;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user