<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 - glFinish does not wait for VBlank"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=110706">110706</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>glFinish does not wait for VBlank
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>19.0
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>x86-64 (AMD64)
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux (All)
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>major
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>Drivers/DRI/i965
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>intel-3d-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>acc12345acc@gmail.com
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>intel-3d-bugs@lists.freedesktop.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=144297" name="attach_144297" title="triangle test">attachment 144297</a> <a href="attachment.cgi?id=144297&action=edit" title="triangle test">[details]</a></span>
triangle test

I have attached a test program (compile with `g++ -o triangle triangle.cpp -lGL
-lGLEW -lglfw`).

The triangle must rotate for 0.5 seconds, then stop for 0.5 seconds and
continue rotating for 0.5 seconds, then stop for 0.5 seconds and so on. If this
is the case, then it means glFinish is working correctly and waiting for
VBlank. (indicated by "PASSED" after 5 seconds)

However, under Intel, the triangle does not continue rotating after stopping,
but rather it skips, which means glFinish is not waiting and Mesa is catching
up. (indicated by "FAILED")

Setting LIBGL_DRI3_DISABLE=1 works around the problem, but it isn't a solution.

glxinfo | grep OpenGL:

```
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) Ivybridge Mobile 
OpenGL core profile version string: 4.2 (Core Profile) Mesa 19.0.4
OpenGL core profile shading language version string: 4.20
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 19.0.4
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.0 Mesa 19.0.4
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00
OpenGL ES profile extensions:
```
uname -a:
```
Linux work 5.0.7-arch1-1-ARCH #1 SMP PREEMPT Mon Apr 8 10:37:08 UTC 2019 x86_64
GNU/Linux
```

/etc/os-release:
```
NAME="Arch Linux"
PRETTY_NAME="Arch Linux"
ID=arch
BUILD_ID=rolling
ANSI_COLOR="0;36"
HOME_URL="<a href="https://www.archlinux.org/">https://www.archlinux.org/</a>"
DOCUMENTATION_URL="<a href="https://wiki.archlinux.org/">https://wiki.archlinux.org/</a>"
SUPPORT_URL="<a href="https://bbs.archlinux.org/">https://bbs.archlinux.org/</a>"
BUG_REPORT_URL="<a href="https://bugs.archlinux.org/">https://bugs.archlinux.org/</a>"
```

lscpu model name: Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz
DRI version: 3</pre>
        </div>
      </p>


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

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