When I changed the Savage driver to flush primitives less frequently to the hardware glxgears performance decreased, which is counter intuitive. The reason is that glFinish currently waits for the blit from back to front buffer and after that the hardware waits for glxgears and the driver to prepare the next frame. Moving the call to glFinish before glXSwapBuffers fixes this and improves performance a lot on this hardware (330fps -> 355fps). Now glxgears and the driver can prepare the next frame while the hardware is busy with the blit (the driver is smart enough to flush after expensive primitives like swap and clear). I'll attach a patch for consideration.
Created attachment 2023 [details] [review] glFinish before glXSwapBuffers
please make sure to also apply this to the glxgears in Mesa, since that's where it lives in the new world order.
ajax wrote: > please make sure to also apply this to the glxgears in Mesa, Both versions need to be sync'ed anyway as the Xorg version already carries a couple of things not available in the stock Mesa version... > since that's where it lives in the new world order. ajax: How is this patch different from the one I did in bug 2220 ?
Ah, I see that the resolution of bug #2220 which was just committed to CVS fixes this one too. Closing as fixed. Thanks!
(In reply to comment #4) > Ah, I see that the resolution of bug #2220 which was just committed to CVS fixes > this one too. Closing as fixed. Thanks! Uhm... bug #2220 was a backout of a previous patch in that bug... are you sure the backout fixed that issue (note that the code does not call |glFinish()| now) ?
(In reply to comment #5) > Uhm... bug #2220 was a backout of a previous patch in that bug... are you sure > the backout fixed that issue (note that the code does not call |glFinish()| now) ? Calling glFinish in a different place was just a workaround for decreased performance without changing the latency (I wasn't sure of the purpose of glFinish, so I tried to change as little as possible). Naturally, not calling glFinish at all removes all performance penalties, which makes me perfectly happy.
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.