[Mesa-dev] [PATCH] egl: don't exit process on initialization failure

Ilia Mirkin imirkin at alum.mit.edu
Thu Aug 14 20:39:33 PDT 2014


On Wed, Aug 13, 2014 at 10:10 PM, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
> Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
> ---

Perhaps I might have mentioned more about this... the situation is
that nouveau_vieux doesn't support EGL (it doesn't have DRIimage or
something along those lines). So the EGL init fails. Which makes
piglit tests that should skip fail with a exit(1) instead, since
that's what _eglLog does when it gets a EGL_FATAL message. It appears
that the error gets returned as expected with this.

An alternative is to not make EGL_FATAL messages exit the program --
that's a pretty nasty thing for a library to do. But there are also
not a lot of uses of it.

  -ilia

>  src/egl/drivers/dri2/egl_dri2.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
> index 5602ec3..dda13a3 100644
> --- a/src/egl/drivers/dri2/egl_dri2.c
> +++ b/src/egl/drivers/dri2/egl_dri2.c
> @@ -358,7 +358,7 @@ dri2_bind_extensions(struct dri2_egl_display *dri2_dpy,
>     for (j = 0; matches[j].name; j++) {
>        field = ((char *) dri2_dpy + matches[j].offset);
>        if (*(const __DRIextension **) field == NULL) {
> -        _eglLog(_EGL_FATAL, "DRI2: did not find extension %s version %d",
> +        _eglLog(_EGL_WARNING, "DRI2: did not find extension %s version %d",
>                  matches[j].name, matches[j].version);
>          ret = EGL_FALSE;
>        }
> --
> 1.8.5.5
>


More information about the mesa-dev mailing list