<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 - [Gallium] glGetQueryObject with GL_ANY_SAMPLES_PASSED returns the same as with GL_SAMPLES_PASSED"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=94037">94037</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[Gallium] glGetQueryObject with GL_ANY_SAMPLES_PASSED returns the same as with GL_SAMPLES_PASSED
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>unspecified
          </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>normal
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>Drivers/Gallium/r600
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>dri-devel@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>peter.fiss@gmx.de
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>dri-devel@lists.freedesktop.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=121579" name="attach_121579" title="Source code of the test program. Needs SDL2 to build. It shows a red background if the describes bug exists.">attachment 121579</a> <a href="attachment.cgi?id=121579&action=edit" title="Source code of the test program. Needs SDL2 to build. It shows a red background if the describes bug exists.">[details]</a></span>
Source code of the test program. Needs SDL2 to build. It shows a red background
if the describes bug exists.

The OpenGL-Wiki says, the function should return "GL_FALSE if none of the
scoped drawing commands generate samples that pass the depth test; otherwise,
the value is GL_TRUE". Source: <a href="https://www.opengl.org/wiki/Query_Object">https://www.opengl.org/wiki/Query_Object</a>

When calling glGetQueryObjecti64v on r600 or nouveau (probably on any gallium
driver) however, it returns the number of samples which passed the depth test.
This would be correct behaviour if the argument was GL_SAMPLES_PASSED instead
of GL_ANY_SAMPLES_PASSED.

I have attached the source code of a simple example program. It worked
correctly on the following platforms:
- Arch Linux with Intel Ivy Bridge graphics (Mesa 11.1.1-1)
- Windows 7 with the same Intel graphics
- Windows 7 with Nvidia GeForce GT 640M
- Windows 7 with ATI Radeon HD 5670

It showed incorrect behaviour on these systems:
- Arch Linux with Nouveau and GeForce GT 640M (Mesa 11.1.1-1)
- Manjaro with r600 and Radeon HD 5670 (Mesa 11.1.1-1)

Note that the bugtracker does not allow me to specify 11.1 as mesa version.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>