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] Add tooling to make it easier to use vulkan validation layers on android #123788

Closed
dnfield opened this issue Mar 30, 2023 · 5 comments · Fixed by flutter/engine#42625
Labels
a: debugging Debugging, breakpoints, expression evaluation engine flutter/engine repository. See also e: labels. P2 Important issues not at the top of the work list platform-android Android applications specifically tool Affects the "flutter" command-line tool. See also t: labels.

Comments

@dnfield
Copy link
Contributor

dnfield commented Mar 30, 2023

Android instructions

Right now, doing the straightforward thing of just copying the libs into android/app/src/main/jniLibs seems to break the --local-engine flag in the tool (at runtime libflutter.so can't be found).

We should see if we can make it easier to do this - this will be important because without the validation layers it's often really hard to figure out what's going wrong on Vulkan on a particular device. We should also have a flag to turn validation on in impeller, which right now requires a custom engine build on Android.

@dnfield dnfield added platform-android Android applications specifically tool Affects the "flutter" command-line tool. See also t: labels. engine flutter/engine repository. See also e: labels. e: vulkan a: debugging Debugging, breakpoints, expression evaluation P2 Important issues not at the top of the work list labels Mar 30, 2023
@dnfield dnfield added this to Impeller Mar 30, 2023
@github-project-automation github-project-automation bot moved this to 🤔 Needs Triage in Impeller Mar 30, 2023
@chinmaygarde
Copy link
Member

I've been following the instructions in https://github.com/flutter/engine/blob/main/impeller/docs/android_validation_layers.md for enabling validations.

@dnfield
Copy link
Contributor Author

dnfield commented Mar 30, 2023

Ahh those are using vklibs instead of jniLibs which probably plays better with the tooling.

@chinmaygarde
Copy link
Member

So, I just tried it your way (I didn't look at those docs first) and it worked for me that way too.

@dnfield
Copy link
Contributor Author

dnfield commented Mar 30, 2023

It works but I get a runtime exception about not finding libflutter.so if I don't manually copy it over

@chinmaygarde chinmaygarde moved this from 🤔 Needs Triage to 🖖 Vulkan in Impeller Mar 30, 2023
gaaclarke added a commit to flutter/buildroot that referenced this issue Jun 7, 2023
issue: flutter/flutter#123788

## 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.
- [x] I read the [Flutter Style Guide] _recently_, and have followed its
advice.
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [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
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[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
gaaclarke added a commit to flutter/engine that referenced this issue 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
@github-project-automation github-project-automation bot moved this from 🖖 Vulkan to ✅ Done in Impeller Jun 9, 2023
loic-sharma pushed a commit to loic-sharma/flutter-engine that referenced this issue 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
@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a: debugging Debugging, breakpoints, expression evaluation engine flutter/engine repository. See also e: labels. P2 Important issues not at the top of the work list platform-android Android applications specifically tool Affects the "flutter" command-line tool. See also t: labels.
Projects
No open projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants