创建新的AVD,同时检查快照和使用主机GPU [英] Create new AVD, check both Snapshot and Use Host GPU

查看:224
本文介绍了创建新的AVD,同时检查快照和使用主机GPU的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我设法创建AVD ,但我不能同时检查快照使用主机GPU 。什么是两者的优势是什么?为什么我不能同时使用? Vogella告诉我两个加快这一进程的不同部分,因此它有意义的我,他们都应该能够被使用。


解决方案

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

从<一个href=\"http://stackoverflow.com/questions/11617131/android-why-snapshots-and-gpu-are-mutually-exclusive\">Android:为什么快照和GPU是互斥的:


  

Android模拟器是基于QEMU,具有模拟各种硬件设备,如将由真正的手机上运行Android找到。具体地说,它模拟了一个名为金鱼神话电话。


  
  

当您保存快照,该设备的RAM必须保存在快照中。但是,这并不仅仅意味着在主RAM - 它也指在电话硬件的所有其他繁琐比特 - 例如CPU寄存器,实时时钟硬件的状态,并在每一个其它任何/所有寄存器在这个虚拟的手机硬件。


  
  

如果您还没有启用GPU,那么图形硬件状态是相当简单 - 这将是一个帧缓冲和一些寄存器重presenting的X尺寸,Y尺寸和像素格式为:


  
  

不过,如果您启用了GPU直通,然后保存该硬件的状态会更复杂。 QEMU必须保存每个纹理的状态,被设置什么照相机上,几何形状和一squillion其它更多的事情而保持在一个的GPU。流入到GPU命令的管道也将具有在任意点被打断,并记录这些命令的执行的状态(硬因为有一个多级管道和某些指令可能已被部分执行)。
  
  

此外,它可能是非常困难的QEMU居然要得到这个信息,因为QEMU只是将其通过主机GPU。有没有办法为QEMU问主机GPU驱动程序到底是什么一直在执行,什么也没有。最起码,这需要由主机操作系统和GPU驱动程序的支持,它甚至可能需要更改的GPU管线把事情简单化,使得管道可以停止和重新启动在任意点。


I managed to create an AVD, but I cannot check both the Snapshot and the Use Host GPU. What are the advantages of both? Why can't I use both? Vogella tells me that both speed up different parts of the process, so it makes sense to me that they should both be able to be used.

解决方案

I think you can not; my AVD manager explicitly disallows it:

From 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.

这篇关于创建新的AVD,同时检查快照和使用主机GPU的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆