<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - glxgears reported frame rate doesn't match actual"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=97043">97043</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>glxgears reported frame rate  doesn't match actual
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Mesa
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>10.5
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Demos
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>mesa-dev@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>b7.10110111@gmail.com
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>mesa-dev@lists.freedesktop.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>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++;</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
          <li>You are the QA Contact for the bug.</li>
      </ul>
    </body>
</html>