gpt4 book ai didi

android - 创建新的 AVD,检查快照和使用主机 GPU

转载 作者:行者123 更新时间:2023-11-29 21:10:57 25 4
gpt4 key购买 nike

我设法 create an AVD ,但我无法同时检查 SnapshotUse Host GPU。两者的优点是什么?为什么我不能同时使用两者? Vogella tells me两者都加速了过程的不同部分,所以对我来说,它们都应该能够被使用是有意义的。

enter image description here

最佳答案

我认为你不能;我的 AVD 管理器明确禁止它:

enter image description here

来自 Android: why snapshots and gpu are mutually exclusive? :

The Android emulator is based on QEMU, which has to simulate various hardware devices as would be found by Android running on a real phone. Specifically it simulates a mythical phone called 'goldfish'.

When you save a snapshot, the device RAM must be saved in the snapshot. But, that doesn't just mean the main RAM - it also refers to all the other fiddly bits of the phone hardware - for example the CPU registers, the state of the real-time clock hardware, and any/all registers in every other piece of hardware in this virtual phone.

If you've not enabled GPU, then the graphics hardware state is fairly simple - it will be a framebuffer, and a few registers representing the x dimension, y dimension and pixel format.

However, if you've enabled GPU passthrough, then saving the state of that hardware would be much more complex. QEMU would have to save the state of each texture, what cameras are set up, geometry, and a squillion other more things which are kept in a GPU. The pipeline of commands flowing to the GPU would also have to be interrupted at an arbitrary point, and the state of execution of those commands recorded (hard since there's a multi-stage pipeline and some instructions may have been partially executed).

Moreover, it might be very hard for qemu actually to get to this information, since qemu is just passing it through to the host GPU. There's no way for qemu to ask the host GPU driver exactly what's been executed and what hasn't. At the very least, this would require support by the host operating system and GPU driver, and it might even require changes to the GPU pipeline to simplify things such that the pipeline can be stopped and restarted at arbitrary points.

关于android - 创建新的 AVD,检查快照和使用主机 GPU,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22889768/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com