目前已知道的是 redriod:andriod in docker ,可以带软解,效率还不错,
1
bao3 2022-10-01 02:13:43 +08:00 via iPhone
Docker container 是容器,不是虚拟机……
|
2
fzinfz 2022-10-01 03:13:48 +08:00
https://learn.microsoft.com/en-us/virtualization/windowscontainers/deploy-containers/gpu-acceleration
DirectX (and all the frameworks built on top of it) are the only APIs that can be accelerated with a GPU today. 3rd party frameworks are not supported. |
5
flyqie 2022-10-01 17:36:28 +08:00 via Android
1. 没搞懂你在这说的 qemu 是什么意思。
2. windows 容器只能在 windows 下部署,不支持 linux ,而且相对于正常版本 windows 做了很多阉割(这种阉割基本无法补齐,只能靠微软)。 3. redroid 是直接改 android 源码并且加 hal 来编译了一个 android rootfs 做的,并不是靠的 qemu ,linux 下用 docker 跑 windows 目前看来大概率只能靠 qemu(with/without kvm),这样所造成的性能损失还是挺大的,个人认为意义有(保持了 host 环境的干净),但是不大(都这样了其实还不如直接在 host 跑,环境污染也不太至于)。 |
6
soclearn OP @flyqie 我直觉感觉 redriod 对 andriod 的改动并不大。虽然我没看代码也看不懂。或许现今的软解技术真的达到了可用的地步( vulkan 这种运行时有了很大的优化,没有 gpu 加速也能获得相当不错的效率)。比如,可以用于云游戏。
anbox ,另一种容器化的安卓。也是加增了图形 API 实现的效率,并配了一个 qemud 的效率层。目前不知道 redriod 和它相比,是不是存在某种技术上的关联 |
9
bao3 2022-10-04 01:29:50 +08:00 via iPhone
@minlearn 这种回复太正常了,省略和部分要是写了,没准人家回复得会更杠。所以网络太多元了,只能顺着你那个问号,我再加个省略号。你看,语气不就对上了。有没有建设性,全在你那个问号上。
|
10
soclearn OP 事实证明我猜的有 8 分对:
``` It's just a parameter to let the Android OS know that it's running in an emulated environment as opposed to running natively on a physical device. For example, the GPU stack has to be somehow emulated using a custom OpenGL driver (in this case `mesa3d`). There's software emulation (swiftshader) and host GPU mode (GLES). For performance reasons when using the host GPU, the GLES commands from the guest have to be serialized and sent over a kernel pipe to the QEMU and to the host OS. The commands are deserialized on the host and executed on the physical host GPU through the Shader Translator library (taken from the Google ANGLE project). The Google's QEMU fork (aka Android Emulator) usually loads this library and then takes care of proper rendering, such that users can see the rendering output of the emulated OS properly inside the emulator window on the host machine. You can do the same for the docker, otherwise you'd have to implement some other trick to share the GPU. virtio-gpu is a Linux kernel facility that is meant to replace QEMU pipe in the future. The high-level details of this OpenGL emulation mechanism are described here: https://android.googlesource.com/platform/external/qemu/+/ma... You can find the implementation of the QEMU OpenGL pipe mechanism here: https://cs.android.com/android/platform/superproject/+/maste... ``` 软解效率高是源于这一个项目:ANGLE (全称 Almost Native Graphics Layer Engine), redriod 和 anbox 果然是同一路线的,,,啥都一样。只是一个 lxc 一个 docker 的区别而已,anbox 有桌面集成直接处理相关的部分,而 redriod 更偏向命令行 adb 呈现服务 |
11
soclearn OP redriod 更接近云。更精简
|
12
soclearn OP 而 anbox 效率高点,与桌面集成更拖沓
|