- August 28, 2008 at 2:52 pm #29575
Hi,I’m trying to read data from framebuffer with following line on Zoom OMAP 3430:glReadPixels( 0, 0, 1920, 1920, GL_RGBA, GL_UNSIGNED_BYTE, pData );The download speed I get at best is about 8 MB/s. Is that normal? I understood that embedded devices have shared memory, so this should be much faster. Does the tiling effect on the speed? What are the most optimal format and type for reading?Thanks.September 30, 2008 at 12:22 pm #32248
What surface are you reading from, is it a renderbuffer or a texture? What format does it have? How are you measuring the transfer rate? Note that glReadPixels implicitly flushes rendering to the surface you’re reading from, so the time required for glReadPixels may include the whole render pipeline latency.September 30, 2008 at 12:59 pm #32249
Hi,I’m reading from framebuffer. I have attached texture with GL_RGB format to it. I also learned this latency issue later and discovered that the actual readback speed is about 25 MB/s. After I’m sure that the execution on GPU is really over, I start the timer before I call the glReadPixels and after I get back from reading, I stop the time.September 30, 2008 at 3:47 pm #32250
Do you specify format and type as (GL_RGB, GL_UNSIGNED_BYTE), or (GL_RGB, GL_UNSIGNED_SHORT_5_6_5)? Are the texture dimensions powers of two? Do you actually use it as a texture, or could you use a renderbuffer instead? What are you using the pixel data for?October 1, 2008 at 9:12 am #32251
I have tryid both, SHORT_5_6_5 and BYTE. I have noticed that reading back as SHORT_5_6_5 is little bit faster. The dimensions haven’t been always powers of two. What I’m doing is sort of general programming (GPGPU) and the resulting pixel data is not for display.