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] Makes validation layers flag work for android #42625

Merged
merged 6 commits into from Jun 9, 2023

Conversation

gaaclarke
Copy link
Member

@gaaclarke gaaclarke commented Jun 7, 2023

This builds and links in the validation layers for android. They then can be turned on or off with a manifest field.

fixes flutter/flutter#123788
depends on flutter/buildroot#741

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt. See testing the engine for instructions on writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@gaaclarke gaaclarke force-pushed the vulkan-validation-on-device branch from 6ff65e3 to 0a19d83 Compare June 7, 2023 20:30
@gaaclarke gaaclarke force-pushed the vulkan-validation-on-device branch from 0a19d83 to ad01407 Compare June 7, 2023 22:17
@gaaclarke gaaclarke marked this pull request as ready for review June 7, 2023 22:51
@gaaclarke gaaclarke requested a review from zanderso June 7, 2023 22:51
@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 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.

shell/config.gni Outdated
@@ -10,6 +10,7 @@ declare_args() {
shell_enable_vulkan = false

shell_enable_software = true
enable_vulkan_validation_layers = false
Copy link
Member

Choose a reason for hiding this comment

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

It looks like there's a convention here to prefix the argument names with shell_.

Copy link
Member Author

Choose a reason for hiding this comment

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

Moved it back to vulkan/config.gni

tools/gn Outdated
)
sys.exit(1)
if args.target_os == 'android':
gn_args['android_api_level'] = int(26)
Copy link
Member

Choose a reason for hiding this comment

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

Is the int() needed?

Copy link
Member Author

Choose a reason for hiding this comment

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

nope, just residual, removed

@@ -3,10 +3,4 @@
# found in the LICENSE file.

declare_args() {
# Whether to include vulkan validation layers, if available.
Copy link
Member

Choose a reason for hiding this comment

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

Probably also useful to retain this comment when copying the arg to the new location.

Can this file be deleted?

Alternately, why not just leave the arg here and include this config.gni where it's needed?

Copy link
Member Author

Choose a reason for hiding this comment

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

Moved it back, that area of the code is fuchsia specific so I thought shell might make more sense. By name alone though it should be relevant.

@gaaclarke gaaclarke force-pushed the vulkan-validation-on-device branch from c202c78 to 2cc91ae Compare June 8, 2023 18:12
@gaaclarke gaaclarke force-pushed the vulkan-validation-on-device branch from 2cc91ae to 73f4eaf Compare June 8, 2023 18:19
@gaaclarke
Copy link
Member Author

Note: this is going to conflict with #42669

@gaaclarke gaaclarke requested a review from zanderso June 8, 2023 18:20
Copy link
Member

@zanderso zanderso left a comment

Choose a reason for hiding this comment

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

@@ -1,4 +1,4 @@
org.gradle.jvmargs=-Xmx1536M
org.gradle.jvmargs=-Xmx2048M
Copy link
Member

Choose a reason for hiding this comment

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

What's this for?

Copy link
Member Author

Choose a reason for hiding this comment

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

I was just running into it. I'm not 100% sure it caused by this change. My theory is that having those extra .so files in the flutter.jar file somehow requires more memory when the build is happening.

Copy link
Contributor

Choose a reason for hiding this comment

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

(this increases the JVM heap that gradle uses. It's probably fine to increase this)

@gaaclarke gaaclarke merged commit 06d0adb into flutter:main Jun 9, 2023
31 checks passed
loic-sharma pushed a commit to loic-sharma/flutter-engine that referenced this pull request Jun 9, 2023
This builds and links in the validation layers for android. They then
can be turned on or off with a manifest field.

fixes flutter/flutter#123788
depends on flutter/buildroot#741

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [ ] I read and followed the [Flutter Style Guide] and the [C++,
Objective-C, Java style guides].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [ ] I added new tests to check the change I am making or feature I am
adding, or Hixie said the PR is test-exempt. See [testing the engine]
for instructions on writing and running engine tests.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I signed the [CLA].
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[C++, Objective-C, Java style guides]:
https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
[testing the engine]:
https://github.com/flutter/flutter/wiki/Testing-the-engine
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 9, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Jun 9, 2023
…128612)

flutter/engine@071e1fb...488876e

2023-06-09 skia-flutter-autoroll@skia.org Roll ANGLE from a185cb8c8924 to 3e4f4caebcb0 (2 revisions) (flutter/engine#42701)
2023-06-09 bdero@google.com [Impeller] Add CPU implementations for all color filters (flutter/engine#42692)
2023-06-09 jonahwilliams@google.com [Impeller] add explicit VMA flush to device memory writes. (flutter/engine#42685)
2023-06-09 30870216+gaaclarke@users.noreply.github.com [Impeller] Makes validation layers flag work for android (flutter/engine#42625)
2023-06-09 jmccandless@google.com Platform channel for predictive back (flutter/engine#39208)

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 jacksongardner@google.com,rmistry@google.com,zra@google.com 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants