Skip to content
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

[Impeller] If validations are enabled but not found, still create the VK context. #45674

Merged
merged 3 commits into from
Sep 12, 2023

Conversation

chinmaygarde
Copy link
Member

@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 Hixie or stuartmorgan on 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.

Copy link
Member

@gaaclarke gaaclarke left a comment

Choose a reason for hiding this comment

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

This is still going to report the backend as Using the Impeller rendering backend (Vulkan with Validation Layers). It will never report Using the Impeller rendering backend (Vulkan).

I'd prefer it to fail, then retry with them turned off so that we get the print statements. We'll have to clean this up at some point so that it only ever says "using" once for what actually gets used. These print statements are latches for integration tests, its better to assert something directly than to assert that an error doesn't get printed.

@chinmaygarde
Copy link
Member Author

chinmaygarde commented Sep 11, 2023

You're right. Didn't patch that log. Momentido.

@chinmaygarde
Copy link
Member Author

@gaaclarke PTAL. I refactored it to report what is actually being used instead of the fail and retry approach though.

Copy link
Member

@gaaclarke gaaclarke left a comment

Choose a reason for hiding this comment

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

Code looks good to me. Want to add a simple test in capabilities_vk_unittests.cc that shows it falling? You just have to mock out the vk::enumerate* calls, should be easy.

@chinmaygarde
Copy link
Member Author

Roger on the test. The test turned out the be even simpler. I just asked for validation and asserted that I got a context. Did see the log being emitted but don't want to parse the log for "Requested Impeller context creation with validations but the validation layers could not be found. Expect no Vulkan validation checks!". Before this patch, we should have gotten no context at all.

Copy link
Member

@gaaclarke gaaclarke left a comment

Choose a reason for hiding this comment

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

thanks, lgtm!

@chinmaygarde chinmaygarde added the autosubmit Merge PR when tree becomes green via auto submit App label Sep 12, 2023
@auto-submit auto-submit bot merged commit 9a32784 into flutter:main Sep 12, 2023
26 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Sep 13, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Sep 13, 2023
…134597)

flutter/engine@c90fadf...7c78ea2

2023-09-12 [email protected] Revert "Lazily allocate RasterCacheItems only when caching is enabled" (flutter/engine#45734)
2023-09-12 1961493 [email protected] Revert "Use a single OffscreenCanvas for rendering in CanvasKit" (flutter/engine#45744)
2023-09-12 [email protected] [Impeller] Patch the compiler to account for subpass inputs and PSO metadata. (flutter/engine#45739)
2023-09-12 [email protected] [Impeller] Fix swapchain recreation for non-polling cases. (flutter/engine#45740)
2023-09-12 [email protected] Roll Fuchsia Mac SDK from QgAHx3BtJfN3TmodS... to UCa49z8fu0hD9cypj... (flutter/engine#45738)
2023-09-12 [email protected] [ios] upload extension safe artifacts (flutter/engine#45664)
2023-09-12 30870216 [email protected] Added test to assert the vulkan embedder threadsafe vkqueue usage (flutter/engine#45732)
2023-09-12 [email protected] [Impeller] If validations are enabled but not found, still create the VK context. (flutter/engine#45674)
2023-09-12 [email protected] Roll Skia from 211d63b1e1f5 to 2d295711337c (7 revisions) (flutter/engine#45729)
2023-09-12 1961493 [email protected] Use a single OffscreenCanvas for rendering in CanvasKit (flutter/engine#42672)

Also rolling transitive DEPS:
  fuchsia/sdk/core/mac-amd64 from QgAHx3BtJfN3 to UCa49z8fu0hD

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
Mairramer pushed a commit to Mairramer/flutter that referenced this pull request Oct 10, 2023
…lutter#134597)

flutter/engine@c90fadf...7c78ea2

2023-09-12 [email protected] Revert "Lazily allocate RasterCacheItems only when caching is enabled" (flutter/engine#45734)
2023-09-12 1961493 [email protected] Revert "Use a single OffscreenCanvas for rendering in CanvasKit" (flutter/engine#45744)
2023-09-12 [email protected] [Impeller] Patch the compiler to account for subpass inputs and PSO metadata. (flutter/engine#45739)
2023-09-12 [email protected] [Impeller] Fix swapchain recreation for non-polling cases. (flutter/engine#45740)
2023-09-12 [email protected] Roll Fuchsia Mac SDK from QgAHx3BtJfN3TmodS... to UCa49z8fu0hD9cypj... (flutter/engine#45738)
2023-09-12 [email protected] [ios] upload extension safe artifacts (flutter/engine#45664)
2023-09-12 30870216 [email protected] Added test to assert the vulkan embedder threadsafe vkqueue usage (flutter/engine#45732)
2023-09-12 [email protected] [Impeller] If validations are enabled but not found, still create the VK context. (flutter/engine#45674)
2023-09-12 [email protected] Roll Skia from 211d63b1e1f5 to 2d295711337c (7 revisions) (flutter/engine#45729)
2023-09-12 1961493 [email protected] Use a single OffscreenCanvas for rendering in CanvasKit (flutter/engine#42672)

Also rolling transitive DEPS:
  fuchsia/sdk/core/mac-amd64 from QgAHx3BtJfN3 to UCa49z8fu0hD

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
@chinmaygarde chinmaygarde deleted the vul_val_opt branch August 22, 2024 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App e: impeller
Projects
No open projects
Archived in project
2 participants