Fix some issues when exporting vulkan structured data.

This commit is contained in:
baldurk
2018-02-14 00:41:04 +00:00
parent 2d07861227
commit ef12af50b4
3 changed files with 8 additions and 4 deletions
+5 -3
View File
@@ -1483,6 +1483,8 @@ ReplayStatus WrappedVulkan::ReadLogInitialisation(RDCFile *rdc, bool storeStruct
{
int sectionIdx = rdc->SectionIndex(SectionType::FrameCapture);
GetResourceManager()->SetState(m_State);
if(sectionIdx < 0)
return ReplayStatus::FileCorrupted;
@@ -1788,13 +1790,13 @@ ReplayStatus WrappedVulkan::ContextReplayLog(CaptureState readType, uint32_t sta
// destroy any events we created for waiting on
for(size_t i = 0; i < m_CleanupEvents.size(); i++)
ObjDisp(GetDev())->DestroyEvent(Unwrap(GetDev()), m_CleanupEvents[i], NULL);
vkFreeCommandBuffers(GetDev(), m_InternalCmds.cmdpool, (uint32_t)m_RerecordCmdList.size(),
m_RerecordCmdList.data());
}
m_CleanupEvents.clear();
vkFreeCommandBuffers(GetDev(), m_InternalCmds.cmdpool, (uint32_t)m_RerecordCmdList.size(),
m_RerecordCmdList.data());
m_RerecordCmds.clear();
m_RerecordCmdList.clear();
+2
View File
@@ -182,6 +182,8 @@ public:
: ResourceManager(), m_State(state), m_Core(core)
{
}
void SetState(CaptureState state) { m_State = state; }
CaptureState GetState() { return m_State; }
~VulkanResourceManager() {}
void ClearWithoutReleasing()
{
+1 -1
View File
@@ -87,7 +87,7 @@ void DoSerialiseViaResourceId(SerialiserType &ser, type &el)
DoSerialise(ser, id);
if(ser.IsReading())
if(ser.IsReading() && !IsStructuredExporting(rm->GetState()))
{
el = VK_NULL_HANDLE;