In the case video memory is in non-linear layout, calling get_tex_surface will result in a whole buffer data conversion no matter glreadpixels only wants data in a sub-rect. The attached code is trying to port pipe_transfer into gallium-mesa-7.4 branch in order to speed up glreadpixels.
Created attachment 26292 [details] patch to enable pipe_transfer
Created attachment 26443 [details] Add code to faster glreadpixels if pbo is used This is to faster glreadpixels when pbo is bound to frame buffer. The path is on top of previous one.
Alex, I've added this to the gallium-mesa-7.4 branch for now, but it could use with updating so we can get this onto master for future use. Submitting patches for master to this bug would be good. Thanks.
Closing. We've reworked transfers, and things seem to work well.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.