5
\$\begingroup\$

I'm interested in developing for the new Nexus 7 tablet when it finally arrives. I've done a little OpenGL development for Android but I'm not sure what I have to do to take advantage of the 12-core GPU on the Nexus 7. Does OpenGL take advantage of the cores for you (in some/all cases); if not, how do I specify which core does what, synchronize between them etc?

\$\endgroup\$
1

2 Answers 2

6
\$\begingroup\$

GLES2 (OpenGL) pretty much forces you to use vertex buffer objects and shaders to do any rendering. That's a good thing because it means you are using the GPU correctly and keeping battery life high by keeping information off the power hungry transfer busses. You don't have to worry about using the entire GPU because those shader units automatically divide up the rendering tasks based on the geometry of your render windows.

http://developer.apple.com/library/ios/#documentation/3DDrawing/Conceptual/OpenGLES_ProgrammingGuide/TechniquesforWorkingwithVertexData/TechniquesforWorkingwithVertexData.html

That's a link to Apple's site, but it will be the same practices for Android.

To the above who says using OpenCL kills battery life, this video speaks differently. It's a demo of the PowerVR GPU using OpenCL on the CPU, then on the GPU. It shows power consumption during the examples where they do image processing.
http://www.youtube.com/watch?v=sDrz-w1jzEU

Running benchmark apps will kill your battery, actually using OpenCL to perform tasks efficiently and quickly will keep power consumption down.

\$\endgroup\$
0
\$\begingroup\$

Yes, OpenGL spreads the load over all available cores on the GPU. To be more exact, the videocard driver spreads the hardware-specific implementation of the OpenGL commands over the cores. I read here that the Tegra 3 chipset by NVIDIA has 8 pixel shader units. That's not a lot compared to desktop videocards, for instance my NVIDIA GeForce GTX 560 Ti card has 384 CUDA cores.

I wouldn't worry about spreading your commands across all available cores, that's well into driver territory. Unless you're using OpenCL on Android, but that's ill-advised because it will eat up your battery like crazy.

\$\endgroup\$

You must log in to answer this question.