-
Notifications
You must be signed in to change notification settings - Fork 126
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
Fix a crash on replay for trimmed trace #1375
Fix a crash on replay for trimmed trace #1375
Conversation
CI gfxreconstruct build queued with queue ID 91877. |
CI gfxreconstruct build # 3576 running. |
CI gfxreconstruct build # 3576 failed. |
ae41810
to
7a5681d
Compare
CI gfxreconstruct build queued with queue ID 94610. |
CI gfxreconstruct build # 3587 running. |
CI gfxreconstruct build # 3587 failed. |
The LunarG CI failure appears to be due to an unrelated GPU crash. I've restored the machine and will restart the test. |
CI gfxreconstruct build queued with queue ID 94960. |
CI gfxreconstruct build # 3590 running. |
CI gfxreconstruct build # 3590 passed. |
If acceleration structure is updated with template, the pNext was not filled, as it is not used for update with template. The state recreation, however, uses ordinary descriptor update call, so pNext must be filled. This changes creates relevant struct and copies it's contents to pNext for state recreation. Change-Id: If42324ff887db6d591b55c10072f5f5ad81d6f2e
I wrote a test to verify this fix in my fork of Sascha Willem's examples. I'm also going to create a separate issue to not use the pnext chains like we are (as you mentioned) but to eventually fix this correctly. |
7a5681d
to
aeb1292
Compare
CI gfxreconstruct build queued with queue ID 130149. |
Rebased on dev (now that #1363 was integrated it through this into chaos. |
CI gfxreconstruct build # 3723 running. |
CI gfxreconstruct build # 3723 passed. |
When the descriptor sets are updated using
vkUpdateDescriptorSetWithTemplate
in the captured application, and the update in question involves updating acceleration structures, the trimmed trace would crash on replay.This is caused by the fact that state recreation uses
vkUpdateDescriptorSets
andVkWriteDescriptorSet
, which requires the information for the update of acceleration structures be chained in thepNext
field of relevantVkWriteDescriptorSet
withVkWriteDescriptorSetAccelerationStructureKHR
structure filled appropriately. As thevkUpdateDescriptorSetWithTemplate
does not share this structure, thepNext
ends up empty on state recreation, and thus causes a crash.This change fixes that, by filling out the required structure and copying it.
This change also depends on #1363 to properly copy the structure data.