[Mesa-dev] [PATCH 13/14] egl: Track EGL_KHR_debug state when going through EGL API calls (v2)
Kyle Brenneman
kbrenneman at nvidia.com
Tue Sep 13 20:52:06 UTC 2016
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."
More information about the mesa-dev
mailing list