<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - eglChooseConfig returns true even if it fails matching the config"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=66886">66886</a>
          </td>
        </tr>

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

        <tr>
          <th>Summary</th>
          <td>eglChooseConfig returns true even if it fails matching the config
          </td>
        </tr>

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

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>fcoulombe@silentfalls.org
          </td>
        </tr>

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

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

        <tr>
          <th>Version</th>
          <td>git
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>EGL
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Mesa
          </td>
        </tr></table>
      <p>
        <div>
        <pre>eglconfig.c:727
i think this should return false
<a href="http://www.khronos.org/registry/egl/sdk/docs/man/xhtml/eglChooseConfig.html">http://www.khronos.org/registry/egl/sdk/docs/man/xhtml/eglChooseConfig.html</a>

i was trying to run this function with 
const EGLint pi32ConfigAttribs[] =
    {
        EGL_LEVEL,                0,
        EGL_SURFACE_TYPE,        EGL_WINDOW_BIT,
        EGL_RENDERABLE_TYPE,    EGL_OPENGL_ES2_BIT,
        EGL_NATIVE_RENDERABLE,    EGL_FALSE,
        EGL_DEPTH_SIZE,            EGL_DONT_CARE,
        EGL_NONE
    };
and it would fail matching a config but the function would return true letting
me think that everything went fine.

<a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED WORKSFORME - [SNB] eglChooseConfig returns no candidate config"
   href="show_bug.cgi?id=50870">https://bugs.freedesktop.org/show_bug.cgi?id=50870</a> <-- might be similar to this 

i changed the data to this
    EGLint pi32ConfigAttribs[5];
    pi32ConfigAttribs[0] = EGL_SURFACE_TYPE;
    pi32ConfigAttribs[1] = EGL_WINDOW_BIT;
    pi32ConfigAttribs[2] = EGL_RENDERABLE_TYPE;
    pi32ConfigAttribs[3] = EGL_OPENGL_ES2_BIT;
    pi32ConfigAttribs[4] = EGL_NONE;
and it worked</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>