Skip to content
This repository has been archived by the owner on Feb 25, 2025. It is now read-only.

[Impeller] Call vkQueuePresentKHR through the ContextVK's synchronized graphics queue wrapper #50509

Merged
merged 1 commit into from
Feb 9, 2024

Conversation

jason-simmons
Copy link
Member

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.

…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.
@flutter-dashboard
Copy link

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.

@jason-simmons
Copy link
Member Author

Testing: this is not a behavior change and will be verified by the next roll of the Vulkan validation layers (see flutter/flutter#141277)

Copy link
Member

@jonahwilliams jonahwilliams left a comment

Choose a reason for hiding this comment

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

LGTM

Agree about testing change. Ultimately will be covered by validation layer changes that have not rolled in yet.

@jason-simmons jason-simmons added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 9, 2024
@auto-submit auto-submit bot merged commit 66faf62 into flutter:main Feb 9, 2024
28 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Feb 9, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Feb 10, 2024
…143256)

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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
autosubmit Merge PR when tree becomes green via auto submit App e: impeller
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants