-
Notifications
You must be signed in to change notification settings - Fork 6k
[Impeller] Do not free a Vulkan command buffer if its command pool has already been destroyed #41761
Conversation
…s already been destroyed Fixes flutter/flutter#125519
|
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!). If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
|
I was able to solve this by having the fence hold onto the Context in #41748 That makes sure that the device lives long enough to kill the tracked objects. |
|
In this case the issue is the lifetime of the command pool, not the device - see flutter/flutter#125519 (comment) The command pool is destroyed by the |
Right, I get that. The command pools before my change are actually cleaned up when the thread is destroyed since a thread_local variable has a strong reference. That PR I linked actually removes the strong link when the context is destroyed. Since the fence holds onto a strong reference to the tracked objects and the context the pool is guaranteed to be alive when the fence finishes. |
|
Once the |
gaaclarke
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.
Talked with jason offline this is a good change. I've seen these command buffers crash when their deallocator is run late. release is a misnomer and isn't releasing the ownership of the c++ wrapper. This all looks good, thanks jason.
…nd pool has already been destroyed (flutter/engine#41761)
…126175) flutter/engine@6b467df...758cbad 2023-05-05 [email protected] [Impeller] Do not free a Vulkan command buffer if its command pool has already been destroyed (flutter/engine#41761) 2023-05-05 [email protected] Remove single window assumption from SceneBuilder (flutter/engine#41559) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Fixes flutter/flutter#125519