On 09/13/2016 02:42 PM, Adam Jackson wrote:
On Tue, 2016-09-13 at 14:14 -0600, Kyle Brenneman wrote:
On 09/13/2016 11:57 AM, Adam Jackson wrote:
@@ -37,7 +39,7 @@
/* This should be kept in sync with _eglInitThreadInfo() */
   #define _EGL_THREAD_INFO_INITIALIZER \
-   { EGL_SUCCESS, NULL, 0, NULL, NULL, NULL }
+   { EGL_SUCCESS, NULL, EGL_NONE, NULL, NULL, NULL }
The API here should be EGL_OPENGL_ES_API, not EGL_NONE. Otherwise, the
current API would effectively change when the _EGLThreadInfo struct is
allocated. Or I guess more generally, _EGL_THREAD_INFO_INITIALIZER
should produce the same data as _eglInitThreadInfo.
Mmm, okay. That's a very close reading of the spec. QueryAPI allows the
result to be EGL_NONE, which does make sense for the dummy thread since
you sure won't be doing much with it. But BindAPI says the default is
EGL_OPENGL_ES_API, so presumably that should apply even to the dummy
context. One does wonder then how you could ever get EGL_NONE out of
QueryAPI.

- ajax
eglQueryAPI allows the result to be EGL_NONE only if it doesn't support GLES. From the spec (EGL 1.5, section 3.7): "The initial value of the current rendering API is EGL_OPENGL_ES_API , unless OpenGL ES is not supported by an implementation, in which case the initial value is EGL_NONE."

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to