[Mesa-dev] [PATCH v2 1/3] egl/x11: fix use of EGL_BAD_NATIVE_WINDOW

Emil Velikov emil.l.velikov at gmail.com
Fri Aug 7 10:37:48 PDT 2015

On 4 August 2015 at 14:32, Frank Binns <frank.binns at imgtec.com> wrote:
> Commit 4ed23fd590 introduced some calls to _eglError inappropriately
> passing it EGL_BAD_NATIVE_WINDOW. This was actually harmless in two of the
> cases as _eglError gets called later on with a more appropriate error code
> but (just to be safe) switch these to _eglLog calls instead.
> The final case is a little trickier as it actually needs to set an error
> of which the following are available (according to the EGL spec):
> Of these, EGL_BAD_ALLOC seems to be the most appropriate given that
> failure can occur either as a result of xcb_get_setup failing due to an
> earlier error on the connection (where the most commonly occurring error
> code is XCB_CONN_CLOSED_MEM_INSUFFICIENT) or as a result of the
> xcb_screen_iterator_t 'rem' field being 0.
> In addition to this, commit af2aea40d2 unconditionally set the error to
> EGL_BAD_NATIVE_WINDOW when creating a window or pixmap surface with a NULL
> native handle. Change this to correctly set the error based on surface
> type.
> v2: Updated patch description (Emil Velikov)
>     Return EGL_BAD_NATIVE_PIXMAP when eglCreatePixmapSurface is called
>     with a NULL native pixmap handle
> Signed-off-by: Frank Binns <frank.binns at imgtec.com>
Reviewed-by: Emil Velikov <emil.l.velikov at gmail.com>

Thanks for the update.


More information about the mesa-dev mailing list