[wiki migration] Engine team pages (#148696)
This sorts the wiki pages owned by the Engine team in the docs/ directory as planned in [flutter.dev/go/migrate-flutter-wiki-spreadsheet](https://docs.google.com/spreadsheets/d/1x65189ZBdNiLRygpUYoU08pwvXD4M-Z157c6pm8deGI/edit?usp=sharing) It also adds the engine and team-engine labels to the bot for future PRs. Changes to the content were only updating cross links. The remaining wiki links will be updated after the rest of the pages are relocated, the original wiki links still work in the meantime. Part of https://github.com/flutter/flutter/issues/145009
This commit is contained in:
49
docs/engine/impeller/Flutter-GPU.md
Normal file
49
docs/engine/impeller/Flutter-GPU.md
Normal file
@@ -0,0 +1,49 @@
|
||||
**Flutter GPU** (previously referred to as "Dart GPU" or "Impeller Dart") is an effort to expose a low level graphics API in the Flutter Framework.
|
||||
|
||||
Design doc: https://flutter.dev/go/impeller-dart
|
||||
|
||||
Flutter GPU's runtime is a thin wrapper over [Impeller](https://github.com/flutter/flutter/wiki/Impeller)'s HAL, from which custom renderers may be entirely built using Dart. Just like with Impeller, Flutter GPU shader bundles are compiled ahead of time using [impellerc](https://github.com/flutter/engine/tree/main/impeller/compiler). As such, Flutter GPU is only available on platforms that support Impeller.
|
||||
|
||||
## Dart FFI
|
||||
|
||||
Under the hood, the API communicates with Flutter Engine via Dart FFI, calling symbols publicly exported by libflutter and/or embedders. These symbols are prefixed with `InternalFlutterGpu`, and are considered unstable. Direct usage of the exported symbols is not supported and will break without notice; the only supported way to use Flutter GPU is by importing `package:flutter_gpu`.
|
||||
|
||||
## Try out Flutter GPU
|
||||
|
||||
Once released, Flutter GPU will be shipped as part of the Flutter SDK in the form of a Dart package called `flutter_gpu`. An early implementation of the `flutter_gpu` package is being developed under the [`lib/gpu` directory](https://github.com/flutter/engine/tree/main/lib/gpu) of the Flutter Engine repository.
|
||||
|
||||
> [!CAUTION]
|
||||
> _All_ aspects of Flutter GPU are subject to breakage or removal at any time without prior deprecation notice or viable feature replacement. DO NOT rely on Flutter GPU for production projects at this time, but DO have fun playing with it and sharing your experiments with the community.
|
||||
|
||||
Flutter GPU is currently unfinished, extremely experimental, and not well documented. [bdero](https://github.com/bdero) is actively developing and testing Flutter GPU against the MacOS desktop embedder; shader compilation and import likely don't function correctly on other platforms yet. However, if you wish to experiment with Flutter GPU, it is possible to do so without a custom Engine build:
|
||||
|
||||
1. Update your Flutter checkout to the latest version in the [master channel](https://docs.flutter.dev/release/upgrade#other-channels).
|
||||
1. Clone [Flutter Engine](https://github.com/flutter/engine) and checkout the Engine commit that the Flutter master channel is currently pinned to. This can be found in the [`bin/internal/engine.version` file](https://github.com/flutter/flutter/blob/main/bin/internal/engine.version) of the main Flutter repository.
|
||||
```sh
|
||||
git clone https://github.com/flutter/engine.git
|
||||
cd engine
|
||||
git reset --hard [PINNED_ENGINE_COMMIT]
|
||||
```
|
||||
1. Create a new Flutter project using the Flutter tool and add `flutter_gpu` as a dependency in `pubspec.yaml` with a local path pointing to the `lib/gpu` directory within the Flutter Engine repository cloned in step 2. For example:
|
||||
```yaml
|
||||
dependencies:
|
||||
flutter:
|
||||
sdk: flutter
|
||||
flutter_gpu:
|
||||
path: ../engine/src/flutter/lib/gpu
|
||||
```
|
||||
1. From here, you can import the API and begin using it.
|
||||
```dart
|
||||
import 'package:flutter_gpu/gpu.dart' as gpu;
|
||||
```
|
||||
Check out this [examples repository](https://github.com/bdero/flutter-gpu-examples), which includes an example of [drawing a triangle](https://github.com/bdero/flutter-gpu-examples/blob/master/lib/triangle.dart), among other things.
|
||||
|
||||
## Reporting bugs
|
||||
|
||||
If you run into issues while using Flutter GPU, please file a bug using the standard [bug report template](https://github.com/flutter/flutter/issues/new?template=2_bug.yml). Additionally, mention "Flutter GPU" in the title, label the bug with the `e: impeller` label, and tag [bdero](https://github.com/bdero) in the issue description.
|
||||
|
||||
## Questions or feedback?
|
||||
|
||||
If you have non-bug report questions surrounding Flutter GPU, there are several ways you can reach out to the developer:
|
||||
* Create a thread in the #help channel of the [Discord server](https://github.com/flutter/flutter/wiki/Chat). Place "Flutter GPU" in the title of the thread and tag @bdero in the message.
|
||||
* Send a Twitter DM to [@algebrandon](https://twitter.com/algebrandon).
|
||||
19
docs/engine/impeller/Impeller-Scene.md
Normal file
19
docs/engine/impeller/Impeller-Scene.md
Normal file
@@ -0,0 +1,19 @@
|
||||
We are excited to have you tinker on [the Impeller Scene Demo presented at Flutter Forward](https://www.youtube.com/live/zKQYGKAe5W8?feature=share&t=7048). While we spend time learning the use-cases and finalizing the API, the functionality for Impeller Scene is behind a compile-time flag. During this time, there are no guarantees around API stability.
|
||||
|
||||
**Compiling the Engine**
|
||||
|
||||
- Configure your Mac host to compile the Flutter Engine by [following the guidance in wiki](https://github.com/flutter/flutter/wiki/Setting-up-the-Engine-development-environment).
|
||||
- Ensure that you are on the [main branch of the Flutter Engine](https://github.com/flutter/engine/tree/main).
|
||||
- Ensure that you are on the [main branch of the Flutter Framework](https://github.com/flutter/flutter/tree/main).
|
||||
- Configure the host build: `./flutter/tools/gn --enable-impeller-3d --no-lto`
|
||||
- Configure the iOS build: `./flutter/tools/gn --enable-impeller-3d --no-lto --ios`
|
||||
- Add the `--simulator --simulator-cpu=arm64` flag to the iOS build if you are going to test on the simulator.
|
||||
- Build host artifacts (this will take a while): `ninja -C out/host_debug`
|
||||
- Build iOS artifacts (this will take a while): `ninja -C out/ios_debug`
|
||||
- If targeting the simulator: `ninja -C out/ios_debug_sim_arm64`
|
||||
- Clone the demo repository: `git clone https://github.com/bdero/flutter-scene-example.git` and move into the directory.
|
||||
- Plug in your device or open `Simulator.app`, then run `flutter devices` to note the device identifier.
|
||||
- Run the demo application: `flutter run -d [device_id] --local-engine ios_debug --local-engine-host host_debug` (or `ios_debug_sim_arm64` if you are running on the Simulator).
|
||||
- On Silicon Macs, prefer `--local-engine-host host_debug_arm64` (adjusting your `ninja` command above accordingly)
|
||||
|
||||
We hope to continue evolving the API and have it available on the stable channel soon!
|
||||
7
docs/engine/impeller/README.md
Normal file
7
docs/engine/impeller/README.md
Normal file
@@ -0,0 +1,7 @@
|
||||
_For user information about Flutter's new rendering backend, check out [Impeller preview](https://docs.flutter.dev/perf/impeller)._
|
||||
|
||||
Team-facing documentation specific to Impeller:
|
||||
|
||||
- [Setting up MoltenVK on macOS for Impeller](Setting-up-MoltenVK-on-macOS-for-Impeller.md)
|
||||
- [Flutter GPU](Flutter-GPU.md)
|
||||
- [Instructions for playing with the Impeller Scene demo|Impeller Scene](Impeller-Scene.md)
|
||||
@@ -0,0 +1,7 @@
|
||||
- Get the MoltenVK SDK from https://vulkan.lunarg.com/sdk/home#mac.
|
||||
- Make sure to check off `System Global Installation`:
|
||||
<img width="855" alt="image" src="https://user-images.githubusercontent.com/8620741/236010259-ae68283a-0a9e-4f85-9513-bc6ba199c351.png">
|
||||
|
||||
- When running `flutter/tools/gn`, add the `--impeller-enable-vulkan` flag, e.g. `./flutter/tools/gn --impeller-enable-vulkan --unopt --mac-cpu arm64`
|
||||
|
||||
You should now be able to build and run the Vulkan host tests, e.g. `out/host_debug_unopt_arm64/impeller_unittests --gtest_filter="*Vulkan*"`.
|
||||
Reference in New Issue
Block a user