glxgears reported frame rate doesn't match actual with indirect rendering
Submitted by Ruslan Kabatsayev
Assigned to mes..@..op.org
Description
Running glxgears with the following command
LIBGL_ALWAYS_INDIRECT=1 glxgears
prints 60 FPS on my system, while actual picture updates are about 1-2 FPS. This is due to command buffering I believe. The fix would be something like this:
--- glxgears.c.orig 2014-03-22 16:59:24.000000000 +0400
+++ glxgears.c 2016-07-22 12:24:15.260412891 +0300
@@ -340,6 +340,10 @@
draw_gears();
glXSwapBuffers(dpy, win);
+ /* Make sure that the whole draw-swap cycle is complete before
+ measurements. Otherwise we'll have rare updates but still
+ report high frame rates with indirect rendering. */
+ glFinish();
frames++;
Version: 10.5
Edited by Daniel Stone