<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><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#c1">Comment # 1</a>
              on <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">bug 66886</a>
              from <span class="vcard"><a class="email" href="mailto:chad.versace@linux.intel.com" title="Chad Versace <chad.versace@linux.intel.com>"> <span class="fn">Chad Versace</span></a>
</span></b>
        <pre>From my understanding of the EGL spec, Mesa behaves correctly.

eglChooseConfig should return false only if an error occured. And, if an error
occurred, then there is always an accompanying error emitted by eglGetError.
Suppose that the user calls eglChooseConfig, passes it a valid attribute list,
no internal EGL errors occur, and the EGL implementation determines that no
available config matches the requested attribute list. No error has actually
occured. Moreover, there is no EGL error code appropriate for this situation.
If no error gets emitted, then there is no error.

If you are checking only the return code of eglChooseConfig, then you use the
function incorrectly. If the function succeeds, you must inspect the
'num_config' out-param before reading the 'configs' output. If no configs were
returned, and no error occurred, then 'num_config' will be 0. However, you must
check the return value of eglChooseConfig for failure *before* checking
'num_config', because 'num_config' remains unmodified when the function fails,
according to the spec.

Francois, for your first example attribute list, did eglChooseConfg set
'num_config' to 0? If so, then the bug should be closed as NOTABUG.</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>