-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Fix gpu driver crash caused by pixel history #3729
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: v1.x
Are you sure you want to change the base?
Conversation
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.
baldurk
left a comment
There was a problem hiding this 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; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
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.