Bug 97043

Summary: glxgears reported frame rate doesn't match actual with indirect rendering
Product: Mesa Reporter: Ruslan Kabatsayev <b7.10110111>
Component: DemosAssignee: mesa-dev
Status: RESOLVED MOVED QA Contact: mesa-dev
Severity: normal    
Priority: medium CC: jon.turney
Version: 10.5   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Ruslan Kabatsayev 2016-07-22 09:36:18 UTC
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++;
Comment 1 Jon Turney 2016-07-22 13:38:05 UTC
See also https://patchwork.freedesktop.org/patch/22951/
Comment 2 GitLab Migration User 2019-05-14 15:37:18 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/demos/issues/11.

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.