[Piglit] [PATCH 1/5] egl: Call eglBindAPI after eglInitialize
emil.l.velikov at gmail.com
Tue Dec 12 14:58:24 UTC 2017
On 12 December 2017 at 09:08, Tapani Pälli <tapani.palli at intel.com> wrote:
> On 12/12/2017 10:23 AM, Tapani Pälli wrote:
>> On 12/11/2017 10:15 PM, Emil Velikov wrote:
>>> From: Emil Velikov <emil.velikov at collabora.com>
>>> A couple of tests were calling eglBindAPI before eglInitialize.
>>> Some versions of Mesa had problem with such invocation order and the
>>> seeming consensus was that apps should not do that.
>>> This is likely a copy/paste mistake, that was also present in Xserver.
>>> Yet the latter was fixed ~1 year ago, while the piglit tests remained in
>>> iffy state.
>> Nope, it is just fine to call eglBindAPI before eglInitialize. It would be
>> a Mesa bug to not allow that.
> I realized I did not state any rationale for this :) Main thing is that EGL
> spec says that eglBindAPI is per thread (not per display) and there is no
> text indicating in the spec that would prevent eglBindAPI to not be called
> before eglInitialize (which is to initialize display).
Right - can swap the commit message with the following:
Calling eglBindAPI before eglInitialize is allowed by the spec since
the former is per thread, while the latter per display.
At the same time it's fairly inconsistent with rest of piglit and
other EGL users.
Both approaches should work and having a consistently looking code is
always a plus.
More information about the Piglit