You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
This is a quick guide to get Vulkan validation layers support for a Flutter application. This guide assumes that you've created the application with `flutter create`, otherwise the locations might vary.
3
+
If you want to run Vulkan Validation Layers with a custom engine build you need
4
+
to add the `--enable-vulkan-validation-layers` to the `gn` invocation to make
5
+
sure the layers are built and injected into the Flutter jar.
4
6
5
-
1. Download the validation layers from this [GitHub](https://github.com/KhronosGroup/Vulkan-ValidationLayers/releases) releases. Typically named `android-binaries-1.3.231.1.zip`.
6
-
2. When you unzip the file, you will see: `arm64-v8a armeabi-v7a x86 x86_64`
7
-
3. Copy these directories to `${FLUTTER_APP}/android/app/src/main/vklibs`. The layout should look similar to:
7
+
Example:
8
8
9
-
```
10
-
src/main/vklibs/
11
-
arm64-v8a/
12
-
libVkLayer_khronos_validation.so
13
-
armeabi-v7a/
14
-
libVkLayer_khronos_validation.so
15
-
x86/
16
-
libVkLayer_khronos_validation.so
17
-
x86-64/
18
-
libVkLayer_khronos_validation.so
9
+
```sh
10
+
flutter/tools/gn \
11
+
--runtime-mode=debug \
12
+
--enable-impeller-vulkan \
13
+
--enable-vulkan-validation-layers \
14
+
--no-lto \
15
+
--unoptimized \
16
+
--android \
17
+
--android-cpu=arm64
19
18
```
20
19
21
-
4. Add the following line to `${FLUTTER_APP}/android/app/build.gradle`, `android > sourceSets` section: `main.jniLibs.srcDirs += 'src/main/vklibs'`.
20
+
Then adding the following field to the
21
+
`android/app/src/main/AndroidManifest.xml` will turn them on:
22
22
23
-
5. This should enable Vulkan validation layers on your Android application.
0 commit comments