0

What is the fastest way to get data back from the OpenGL context? At the moment I am rendering to a texture and read back the result using glReadPixels().

On a Samsung S3 Mini (I8190, Android 4.1.2, GPU Mali-400 MP, CPU NovaThor U8420 DualCore) it takes about 40 milliseconds for 640x480x4 (resolutionxcolor) bytes ~ 1.3 MByte of data. On a LG G2 (LG-D802, Android 4.2.2, GPU Adreno 330, CPU Snapdragon S4 Pro QuadCore), the same application takes about 110 milliseconds.

The LG G2 is supposed to be much faster, benchmarking a NDK/C++ sorting application shows a > 2x better performance over the S3 Mini (CPU performance). Thus I assume to have at least the same number on the glReadPixels() if memory bandwidth (memcpy/DMA) is the limit. I guess, that Qualcomm/Adreno (LG) either transfers the data in some low-priority thread or performs some color transformation (X -> RGBA) in software.

Is there another, faster way to transfer data from the GPU (OpenGL ES + vendor extensions) to the CPU?

Friedrich
  • 645
  • 11
  • 26

1 Answers1

0

glReadPixels is fastest way. Because you haven't direct access to gpu memory. Only open source mali driver has it.

MrKalach
  • 9
  • 4