Make sure to remove secondary subpass flag on renderpasses

* When replaying draws alone in a primary command buffer we need to revert back
  to normal draws in subpasses.
This commit is contained in:
baldurk
2022-03-15 10:53:26 +00:00
parent 036a5c8da0
commit efbc17335b
4 changed files with 12 additions and 0 deletions
+3
View File
@@ -1045,6 +1045,9 @@ ResourceId VulkanReplay::RenderOverlay(ResourceId texid, FloatVector clearCol, D
state.subpass = 0;
state.SetFramebuffer(m_pDriver, GetResID(m_Overlay.NoDepthFB));
state.subpassContents = VK_SUBPASS_CONTENTS_INLINE;
state.dynamicRendering.flags &= VK_RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT;
state.graphics.pipeline = GetResID(pipe);
// set dynamic scissors in case pipeline was using them
+3
View File
@@ -3026,6 +3026,9 @@ void VulkanReplay::FetchTessGSOut(uint32_t eventId, VulkanRenderState &state)
state.xfbbuffers.clear();
state.xfbcounters.clear();
state.subpassContents = VK_SUBPASS_CONTENTS_INLINE;
state.dynamicRendering.flags &= VK_RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT;
if(m_PostVS.XFBQueryPoolSize < action->numInstances)
{
if(m_PostVS.XFBQueryPoolSize != VK_NULL_HANDLE)
@@ -1717,6 +1717,9 @@ void VulkanReplay::FetchShaderFeedback(uint32_t eventId)
}
}
modifiedstate.subpassContents = VK_SUBPASS_CONTENTS_INLINE;
modifiedstate.dynamicRendering.flags &= VK_RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT;
{
VkCommandBuffer cmd = m_pDriver->GetNextCmd();
@@ -4467,6 +4467,9 @@ ShaderDebugTrace *VulkanReplay::DebugPixel(uint32_t eventId, uint32_t x, uint32_
}
}
modifiedstate.subpassContents = VK_SUBPASS_CONTENTS_INLINE;
modifiedstate.dynamicRendering.flags &= VK_RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT;
{
VkCommandBuffer cmd = m_pDriver->GetNextCmd();