diff options
author | Matt Turner <[email protected]> | 2015-03-10 11:41:57 -0700 |
---|---|---|
committer | Matt Turner <[email protected]> | 2015-03-13 10:42:38 -0700 |
commit | dac2e7deaae2540645a6b485c7d1f47195689116 (patch) | |
tree | 4168a4bdc7f1dacc9459af876bcd43ce23310bb8 /src/egl/main/egldisplay.h | |
parent | b43bbfa90ace596c8b2e0b3954a5f69924726c59 (diff) |
egl: Create queryable strings in eglInitialize().
Creating/recreating the strings in eglQueryString() is extra work and
isn't thread-safe, as exhibited by shader-db's run.c using libepoxy.
Multiple threads in run.c call eglReleaseThread() around the same time.
libepoxy calls eglQueryString() to determine whether eglReleaseThread()
exists, and our EGL implementation passes a pointer to the version
string to libepoxy while simultaneously overwriting the string, leading
to a failure in libepoxy.
Moreover, the EGL spec says (emphasis mine):
"eglQueryString returns a pointer to a *static*, zero-terminated string"
This patch moves some auxiliary functions from eglmisc.c to eglapi.c so
that they may be used to create the extension, API, and version strings
once during eglInitialize(). The auxiliary functions are renamed from
_eglUpdate* to _eglCreate*, and some checks made unnecessary by calling
the functions from eglInitialize() are removed.
Reviewed-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/egl/main/egldisplay.h')
0 files changed, 0 insertions, 0 deletions