mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-07-17 04:57:09 +00:00
Respect the original subpass contents when replaying renderpasses
* We also need to take care to patch this now, when replaying a single draw that was originally in a secondary but we replay in a primary.
This commit is contained in:
@@ -3717,6 +3717,13 @@ void WrappedVulkan::ReplayLog(uint32_t startEventID, uint32_t endEventID, Replay
|
||||
vkr = ObjDisp(cmd)->BeginCommandBuffer(Unwrap(cmd), &beginInfo);
|
||||
CheckVkResult(vkr);
|
||||
|
||||
// we're replaying a single item inline, even if it was previously in a secondary command
|
||||
// buffer execution.
|
||||
VkSubpassContents subpassContents = m_RenderState.subpassContents;
|
||||
VkRenderingFlags dynamicFlags = m_RenderState.dynamicRendering.flags;
|
||||
m_RenderState.subpassContents = VK_SUBPASS_CONTENTS_INLINE;
|
||||
m_RenderState.dynamicRendering.flags &= VK_RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT;
|
||||
|
||||
rpWasActive = m_Partial[Primary].renderPassActive;
|
||||
|
||||
if(m_Partial[Primary].renderPassActive)
|
||||
@@ -3761,6 +3768,9 @@ void WrappedVulkan::ReplayLog(uint32_t startEventID, uint32_t endEventID, Replay
|
||||
// even outside of render passes, we need to restore the state
|
||||
m_RenderState.BindPipeline(this, cmd, VulkanRenderState::BindInitial, false);
|
||||
}
|
||||
|
||||
m_RenderState.subpassContents = subpassContents;
|
||||
m_RenderState.dynamicRendering.flags = dynamicFlags;
|
||||
}
|
||||
|
||||
ReplayStatus status = ReplayStatus::Succeeded;
|
||||
|
||||
@@ -141,10 +141,11 @@ void VulkanRenderState::BeginRenderPassAndApplyState(WrappedVulkan *vk, VkComman
|
||||
imagelessAttachments.pAttachments = imagelessViews.data();
|
||||
}
|
||||
|
||||
ObjDisp(cmd)->CmdBeginRenderPass(Unwrap(cmd), &rpbegin, VK_SUBPASS_CONTENTS_INLINE);
|
||||
ObjDisp(cmd)->CmdBeginRenderPass(Unwrap(cmd), &rpbegin, subpassContents);
|
||||
}
|
||||
|
||||
BindPipeline(vk, cmd, binding, true);
|
||||
if(subpassContents != VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS)
|
||||
BindPipeline(vk, cmd, binding, true);
|
||||
|
||||
if(IsConditionalRenderingEnabled())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user