Can Android renderscript run on GPU?

本秂侑毒 提交于 2019-12-23 07:27:56

问题


Are there any Android devices where renderscript executes on the GPU instead of the CPU, or is this something not yet implemented anywhere?


回答1:


As of JellyBean 4.2 there is a direct GPU integration for renderscript. See this and this.




回答2:


I cannot confirm with any official documentation for Google, but I work with RenderScript all day every day and each time I run it, I see the logcat report loading drivers for graphics chips in my devices, most notably Tegra 2. Google has really lagged in documenting RenderScript, and I would not at all be surprised if they simply havn't corrected this omission in their discussion.




回答3:


Currently the compute side of Renderscript will only run on the CPU:

For now, compute Renderscripts can only take advantage of CPU cores, but in the future, they can potentially run on other types of processors such as GPUs and DSPs.

Taken from Renderscript dev guide.

The graphics side of Renderscript sits on top of OpenGL ES so the shaders will run on the GPU.

ARM's Mali-T604 GPU will provide a target for the compute side of Renderscript (in a future Android release?) (see ARM Blog entry).




回答4:


The design of RenderScript is so that it runs on the GPU. This was the main purpose of adding the new language. I assume there are devices where it runs on the CPU due to lack of support, but on most devices it runs on the GPU




回答5:


I think this may depend on whether you're doing graphics or compute operations. The graphics operations will likely get executed on the GPU but the compute operations won't as far as I understand.

When you use the forEach construct the computation will run in multiple threads on the CPU, not the GPU (you can see this in the ICS source code). In future releases this may change (see https://events.linuxfoundation.org/slides/2011/lfcs/lfcs2011_llvm_liao.pdf) but I haven't seen any announcements.




回答6:


Currently, only the Nexus 10 seems to support Renderscript GPU compute.



来源:https://stackoverflow.com/questions/10970165/can-android-renderscript-run-on-gpu

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!