[Mesa-dev] [PATCH v2] egl/dri2: dri2_make_current: Set EGL error if bindContext fails
Nicolas Boichat
drinkcat at chromium.org
Fri Jul 15 07:58:08 UTC 2016
Please ignore this patch, I'll resend along with some slightly
improved/annotated EGL error handling.
On Thu, Jul 14, 2016 at 12:22 PM, Nicolas Boichat <drinkcat at chromium.org> wrote:
> From: Nicolas Boichat <drinkcat at chromium.org>
>
> Without this, if a configuration is, say, available only on GLES2/3, but
> not on GLES1, and is rejected by the dri module's bindContext call,
> eglMakeCurrent fails with error "EGL_SUCCESS".
>
> In this patch, we set error to EGL_BAD_MATCH, which is what CTS/dEQP
> dEQP-EGL.functional.surfaceless_context expect.
>
> Cc: "11.2 12.0" <mesa-stable at lists.freedesktop.org>
> Signed-off-by: Nicolas Boichat <drinkcat at google.com>
> Reviewed-by: Emil Velikov <emil.velikov at collabora.com>
> ---
> src/egl/drivers/dri2/egl_dri2.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
> index bfde640..3cbdd0a 100644
> --- a/src/egl/drivers/dri2/egl_dri2.c
> +++ b/src/egl/drivers/dri2/egl_dri2.c
> @@ -1231,6 +1231,7 @@ dri2_make_current(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *dsurf,
> _eglPutSurface(old_rsurf);
> _eglPutContext(old_ctx);
>
> + _eglError(EGL_BAD_MATCH, "eglMakeCurrent error");
I think you meant I should use "eglMakeCurrent" as error string.
> return EGL_FALSE;
> }
> }
> --
> 2.8.0.rc3.226.g39d4020
>
More information about the mesa-dev
mailing list