Created attachment 45537 [details]
simple app the exibhits the problem
When using glReadPixels(0, 0, w, h, GL_RGBA, GL_UNSIGNED_BYTE, buffer) there's a speed difference between reading back from framebuffer or from an FBO.
Using gdb I found that format field of renderbuffer structure is always equal PIPE_FORMAT_NONE for the FBO which prevents using st_fast_readpixels.
I've built a simple patch which init format field in "st_renderbuffer_alloc_storage" and there is an improvement (a.k.a st_fast_readpixels is used everywhere).
What do you think of this (potential) issue ?
(I'm using git version of Mesa, and r600g)
Created attachment 45538 [details] [review]
Has anyone been able to test the above patch ?
Committed. I didn't see any fbo regressions with piglit. I'm surprised this wasn't found a long time ago. Thanks.
on Oct 26, 2016 at 05:43:28.
(provided by the Example extension).