Include parent command buffer flags in test for an active render pass

If the parent command buffer was begun with VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT then that implies an active render pass to propagate to the child command buffer.

Fixes incorrect error report in nested command buffers:
"Executing a command buffer with RENDER_PASS_CONTINUE_BIT outside of render pass"
This commit is contained in:
Jake Turner
2026-03-31 14:44:09 +01:00
parent a33b203f6c
commit 3f57669509
@@ -5482,8 +5482,12 @@ bool WrappedVulkan::Serialise_vkCmdExecuteCommands(SerialiserType &ser, VkComman
parentCmdBufInfo.curEventID++;
bool parentActiveRenderPass = parentCmdBufInfo.state.ActiveRenderPass();
parentActiveRenderPass |=
((parentCmdBufInfo.beginFlags & VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT) != 0);
// should we add framebuffer usage to the child draws.
bool framebufferUsage = parentCmdBufInfo.state.ActiveRenderPass();
bool framebufferUsage = parentActiveRenderPass;
for(uint32_t c = 0; c < commandBufferCount; c++)
{
@@ -5504,8 +5508,7 @@ bool WrappedVulkan::Serialise_vkCmdExecuteCommands(SerialiserType &ser, VkComman
AddAction(marker);
parentCmdBufInfo.curEventID++;
if(m_BakedCmdBufferInfo[m_LastCmdBufferID].state.GetRenderPass() == ResourceId() &&
!m_BakedCmdBufferInfo[m_LastCmdBufferID].state.dynamicRendering.active &&
if(!parentActiveRenderPass &&
(cmdBufInfo.beginFlags & VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT))
{
AddDebugMessage(