Call CmdNextSubpass as appropriate on early-end of renderpass. Refs #195

This commit is contained in:
baldurk
2016-02-29 20:15:31 +01:00
parent 97220a4468
commit 8bee720c6a
2 changed files with 14 additions and 0 deletions
+7
View File
@@ -1919,7 +1919,14 @@ void WrappedVulkan::ReplayLog(uint32_t frameID, uint32_t startEventID, uint32_t
// check if the render pass is active - it could have become active
// even if it wasn't before (if the above event was a CmdBeginRenderPass)
if(m_PartialReplayData.renderPassActive)
{
uint32_t numSubpasses = (uint32_t)m_CreationInfo.m_RenderPass[m_RenderState.renderPass].subpasses.size();
for(uint32_t sub=m_RenderState.subpass; sub < numSubpasses-1; sub++)
ObjDisp(cmd)->CmdNextSubpass(Unwrap(cmd), VK_SUBPASS_CONTENTS_INLINE);
ObjDisp(cmd)->CmdEndRenderPass(Unwrap(cmd));
}
// we might have replayed a CmdBeginRenderPass or CmdEndRenderPass,
// but we want to keep the partial replay data state intact, so restore
@@ -514,7 +514,14 @@ bool WrappedVulkan::Serialise_vkEndCommandBuffer(Serialiser* localSerialiser, Vk
bool recordAll = m_DrawcallCallback && m_DrawcallCallback->RecordAllCmds();
if(!recordAll && m_PartialReplayData.renderPassActive)
{
uint32_t numSubpasses = (uint32_t)m_CreationInfo.m_RenderPass[m_RenderState.renderPass].subpasses.size();
for(uint32_t sub=m_RenderState.subpass; sub < numSubpasses-1; sub++)
ObjDisp(commandBuffer)->CmdNextSubpass(Unwrap(commandBuffer), VK_SUBPASS_CONTENTS_INLINE);
ObjDisp(commandBuffer)->CmdEndRenderPass(Unwrap(commandBuffer));
}
ObjDisp(commandBuffer)->EndCommandBuffer(Unwrap(commandBuffer));