OpenGL texture readback

This is the place for software discussions not having a dedicated subforum

OpenGL texture readback

Postby LukasE » Wed Apr 27, 2016 4:26 pm

Hi all,

I'm looking for an efficient way to use the GPU on the Wandboard for image and general data processing. Currently I'm using OpenGL and C++ with Qt5.6 on the 5.0.2 Android image.

Uploading data to the GPU via glTexDirectVIV is fast enough for my needs, but reading back isn't. For readback, I'm using PBOs as described here. However, the glReadPixels call with a PBO attached takes around 290ms for a 32-bit VGA GL_RGBA image. Is there any faster way to get rendered data back into CPU memory?
LukasE
 
Posts: 1
Joined: Wed Apr 27, 2016 4:09 pm

Re: OpenGL texture readback

Postby ClayMontgomery » Wed May 11, 2016 2:46 pm

There is no way to make glReadPixels really fast, even if you could get the source code to Vivante's drivers. The GPU is limited by its deferred rendering tile-based design.

It is somewhat faster if you call it from C++ rather than Java because an extra copy can be eliminated. There is also a strong possibility that using Qt slows it down even more.

I experimented once with trying to use Android's GraphicBuffer class to read as well as write, but there are problems with this due to the HWC design of Android's SurfaceFlinger.

Here are some links I recommend for further research on this:
http://stackoverflow.com/questions/3126 ... -a-texture
https://source.android.com/devices/grap ... aceFlinger
https://community.freescale.com/docs/DOC-93612
software.intel.com/en-us/articles/using-opengl-es-to-accelerate-apps-with-legacy-2d-guis

I recommend you take a look at using OpenCL.

Regards, Clay
ClayMontgomery
 
Posts: 56
Joined: Tue Nov 19, 2013 9:14 pm


Return to Software - General

Who is online

Users browsing this forum: No registered users and 6 guests

cron