Fix recording transitions into wrong place on capture

This commit is contained in:
baldurk
2016-02-07 18:45:31 +01:00
parent efc0aa5a08
commit 9fceda593f
3 changed files with 5 additions and 5 deletions
@@ -1739,7 +1739,7 @@ void WrappedVulkan::vkCmdPipelineBarrier(
ResourceId cmd = GetResID(cmdBuffer);
{
SCOPED_LOCK(m_ImageLayoutsLock);
GetResourceManager()->RecordTransitions(m_BakedCmdBufferInfo[cmd].imgtransitions, m_ImageLayouts, (uint32_t)imTrans.size(), &imTrans[0]);
GetResourceManager()->RecordTransitions(GetRecord(cmdBuffer)->cmdInfo->imgtransitions, m_ImageLayouts, (uint32_t)imTrans.size(), &imTrans[0]);
}
}
}
@@ -355,13 +355,13 @@ VkResult WrappedVulkan::vkQueueSubmit(
{
ResourceId cmd = GetResID(pCmdBuffers[i]);
VkResourceRecord *record = GetRecord(pCmdBuffers[i]);
{
SCOPED_LOCK(m_ImageLayoutsLock);
GetResourceManager()->ApplyTransitions(m_BakedCmdBufferInfo[cmd].imgtransitions, m_ImageLayouts);
GetResourceManager()->ApplyTransitions(record->cmdInfo->imgtransitions, m_ImageLayouts);
}
VkResourceRecord *record = GetRecord(pCmdBuffers[i]);
// need to lock the whole section of code, not just the check on
// m_State, as we also need to make sure we don't check the state,
// start marking dirty resources then while we're doing so the
@@ -849,7 +849,7 @@ void WrappedVulkan::vkCmdWaitEvents(
ResourceId cmd = GetResID(cmdBuffer);
{
SCOPED_LOCK(m_ImageLayoutsLock);
GetResourceManager()->RecordTransitions(m_BakedCmdBufferInfo[cmd].imgtransitions, m_ImageLayouts, (uint32_t)imTrans.size(), &imTrans[0]);
GetResourceManager()->RecordTransitions(GetRecord(cmdBuffer)->cmdInfo->imgtransitions, m_ImageLayouts, (uint32_t)imTrans.size(), &imTrans[0]);
}
record->AddChunk(scope.Get());