Renderscript and the GPU

旧时模样 提交于 2019-12-01 18:14:19

In general, those claims about Nexus 10's behavior are correct. There are some other things about calling some of the RS runtime functions (for example, don't call rsGetAllocation) that would cause the CPU to run a function. However, I think globals that aren't allocations or bound pointers are okay in 4.2.

Going forward, a lot of those restrictions are going to be relaxed (globals being the big one).

In terms of seeing where a kernel runs: there's not much you can do with 4.2 to figure that out. We haven't seen a compelling reason to do so yet, but if this turns out to be really important it's something we could add without too much difficulty via something like systrace. Feel free to complain to us if you can demonstrate why that's hurting you beyond "I assume the code will run faster on the GPU."

I'm pretty sure that the Mandelbrot implementation in ImageProcessing (fw/base/tests/RenderScriptTests/ImageProcessing/) runs on the GPU in 4.2.

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