[Mesa-dev] EGL_BAD_CONTEXT error when creating shared context

Divick Kishore divick.kishore at gmail.com
Wed Jun 5 20:54:25 PDT 2013


On Wed, Jun 5, 2013 at 10:33 PM, Chad Versace
<chad.versace at linux.intel.com> wrote:

> Divick, you created two EGLDisplays. Did you obtain each EGLDisplay by
> passing the same
> native display to eglGetDisplay? If so, then EGL should have returned the
> same EGLDisplay
> pointer. The EGL spec requires that, and Mesa's libEGL has code to do that.
> If you
> received different EGLDisplay pointers, then there does exist a bug.
>

No I was not passing the same native display earlier when I was
getting the error. I was calling XOpenDisplay(NULL) and passing the
returned x_display to eglGetDisplay() for the other context as well.
Once I fixed this part that instead of calling XOpenDisplay again I
simply passed the same native display to eglGetDisplay and it returned
me the same eglDisplay. So from your quote from EGL Specs, it seems
there is no bug in Mesa, the contexts which need to share objects
needs to have the same eglDisplays.

Thanks for clarifying,
Regards,
Divick


More information about the mesa-dev mailing list