[Mesa-dev] EGL_BAD_CONTEXT error when creating shared context
Divick Kishore
divick.kishore at gmail.com
Tue May 28 23:56:28 PDT 2013
Hi Brian,
thanks for your reply.
On Tue, May 28, 2013 at 9:33 PM, Brian Paul <brianp at vmware.com> wrote:
> I took at look at eglCreateContext(). It's basically:
>
> EGLContext
> eglCreateContext(EGLDisplay dpy, EGLConfig config, EGLContext share_list,
> const EGLint *attrib_list)
> {
> _EGLContext *share = _eglLookupContext(share_list, disp);
> ...
>
> if (!share && share_list != EGL_NO_CONTEXT)
> RETURN_EGL_ERROR(disp, EGL_BAD_CONTEXT, EGL_NO_CONTEXT);
> ...
> }
>
> If the error is coming from there, it means that the share_list context
> you're passing in isn't recognized by EGL as a valid context.
I did have a look at the source but couldn't understand really why
_EGLContext *share = _eglLookupContext(share_list, disp);
returns a NULL value for share. Had a look a bit more deeper and I saw
that the display values for both the contexts were different. I then
modified my code then not to open a new display for the new context
instead share the display with the older one and then everything
worked like a charm.
Thanks for your help. First step is usually the hardest step, so thank
for pointing in the right direction.
Another thing that I wanted to check was that I have ported some of
the performance demos from mesa demos to use EGL and GLES2.0. If it is
useful in general to community then how can I get the sources reviewed
and commit to mesa demos repository?
Thanks for your help,
Regards,
Divick
More information about the mesa-dev
mailing list