[Impeller] Call vkQueuePresentKHR through the ContextVK's synchronized graphics queue wrapper#50509
Conversation
…d graphics queue wrapper SwapchainImplVK had been querying the physical device for a queue that supports presentation on the specified surface. However, the selected queue is typically the same VkQueue instance as the graphics queue provided by ContextVK. This could cause a thread policy violation where the raster thread is calling vkQueuePresentKHR while the IO thread is calling vkQueueSubmit on the same queue during image decoding. This PR moves the vkQueuePresentKHR call to the ContextVK's graphics queue wrapper, which serializes access to the VkQueue.
|
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 "@test-exemption-reviewer" in the #hackers channel in Chat (don't just cc them here, they won't see it! Use 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. |
|
Testing: this is not a behavior change and will be verified by the next roll of the Vulkan validation layers (see flutter/flutter#141277) |
jonahwilliams
left a comment
There was a problem hiding this comment.
LGTM
Agree about testing change. Ultimately will be covered by validation layer changes that have not rolled in yet.
…chronized graphics queue wrapper (flutter/engine#50509)
flutter/engine@6a3b021...f969c52 2024-02-09 [email protected] [Impeller] Remove the unused Vulkan queue submit task runner (flutter/engine#50511) 2024-02-09 [email protected] Make .style.yapf and .pylintrc agree on line length (flutter/engine#50510) 2024-02-09 [email protected] [Impeller] Call vkQueuePresentKHR through the ContextVK's synchronized graphics queue wrapper (flutter/engine#50509) 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://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
SwapchainImplVK had been querying the physical device for a queue that supports presentation on the specified surface. However, the selected queue is typically the same VkQueue instance as the graphics queue provided by ContextVK.
This could cause a thread policy violation where the raster thread is calling vkQueuePresentKHR while the IO thread is calling vkQueueSubmit on the same queue during image decoding.
This PR moves the vkQueuePresentKHR call to the ContextVK's graphics queue wrapper, which serializes access to the VkQueue.