OSDN Git Service

egl/dri2: dri2_make_current: Set EGL error if bindContext fails
authorNicolas Boichat <drinkcat@chromium.org>
Fri, 15 Jul 2016 08:24:20 +0000 (16:24 +0800)
committerEmil Velikov <emil.l.velikov@gmail.com>
Wed, 20 Jul 2016 14:10:33 +0000 (15:10 +0100)
commit9bebef4034c79d0f223a6e61943dd44bcb6442ee
treedce31ddc83e5b2dbff2473a510931e59d2e8f9c8
parentccda100a5a2838adec16ac10b2cc1c73e666e7d2
egl/dri2: dri2_make_current: Set EGL error if bindContext fails

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@lists.freedesktop.org>
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
src/egl/drivers/dri2/egl_dri2.c