Skip to content

Conversation

@nwpuCfy
Copy link

@nwpuCfy nwpuCfy commented Nov 12, 2025

Force load renderpass contains only one subpass, if not set subpass, the subpass passed to gpu driver mismatch the actual subpass, and then causes crash.

Force load renderpass contains only one subpass, if not set subpass,
the subpass passed to gpu driver mismatch the actual subpass,
and then causes crash.
Copy link
Owner

@baldurk baldurk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not entirely sure I follow the exact problem - I understand there might be a language barrier, but are you able to explain in more detail what happens? Or could you share a reproducible test case that shows the problem happening?

I think something should be fixed, but I've left one comment and it would be good to understand better to make sure the fix isn't better placed elsewhere perhaps.

In general both subpasses and secondary command buffers are mostly rarely used and there are a lot of problems with getting them to work in pixel history, so results likely will be poor, but we should not crash.


if(m_ActionCallback && m_ActionCallback->ForceLoadRPs())
{
unwrappedInheritInfo.subpass = 0;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I understand right I think this should happen below, after this value is used to look up the right element in loadFBs and loadRPs?

Without knowing exactly what goes wrong it's hard to say.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when calling Pixel History, m_ActionCallback is called too in vkBeginCommandBuffer; however, in the case when vkCmdExecuteCommands is executed in 1-indexed subpass, the subpass passed to driver is 1, but the actual subpass
is 0 (because renderdoc change original rp to force load rp); this is the real case in the game ‘Star Resonance’ and causes
crash in our driver(innosilicon gpu).

Copy link
Author

@nwpuCfy nwpuCfy Nov 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

API call goes like this:

vkCmdBeginRenderpass
......
vkCmdExecuteCommands
......
vkCmdNextSubpass
vkCmdExecuteCommands (crash)
......
driver may need the right subpass info

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK if I understand right then, the change I mentioned should be made to ensure the right load RP is selected but otherwise this sounds good.

Copy link
Author

@nwpuCfy nwpuCfy Nov 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK if I understand right then, the change I mentioned should be made to ensure the right load RP is selected but otherwise this sounds good.

Yes, choose the subpass of the load pr instead of the subpass of the original pr.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants