Blumenkrantz "Massively Improves" Mesa's glReadPixels Performance With 7 Lines Of Code
Mike Blumenkrantz of Valve's open-source/Linux graphics driver team has submitted a merge request to "massively" improve the OpenGL glReadPixels performance within the common Mesa state tracker.
Due to performance issues with a Steam Direct3D Windows game that embeds a number of video files and Proton in turn relying on GStreamer to play the video files, Blumenkrantz was exploring the perf profile and the overhead of all the memory copies from the pixel back buffer texture upload to glReadPixels memory copy download path as part of the video transcode pipeline.
Blumenkrantz has made the glReadPixels operation much more efficient by using compute pixel buffer object (PBO) downloads. He is reporting upwards of 100% better performance for glReadPixels in a number of cases.
Most impressive out of this massive performance improvement? It's just seven lines of new code via this merge request.
More details over on Mike's blog. Assuming the merge request lands soon, it will be part of next quarter's Mesa 24.2 feature release.
Due to performance issues with a Steam Direct3D Windows game that embeds a number of video files and Proton in turn relying on GStreamer to play the video files, Blumenkrantz was exploring the perf profile and the overhead of all the memory copies from the pixel back buffer texture upload to glReadPixels memory copy download path as part of the video transcode pipeline.
Blumenkrantz has made the glReadPixels operation much more efficient by using compute pixel buffer object (PBO) downloads. He is reporting upwards of 100% better performance for glReadPixels in a number of cases.
"this massively improves (>100%) ReadPixels perf in a number of cases"
Most impressive out of this massive performance improvement? It's just seven lines of new code via this merge request.
More details over on Mike's blog. Assuming the merge request lands soon, it will be part of next quarter's Mesa 24.2 feature release.
172 Comments