diff options
author | Tapani Pälli <tapani.palli@intel.com> | 2016-10-20 14:11:16 +0300 |
---|---|---|
committer | Emil Velikov <emil.l.velikov@gmail.com> | 2016-10-27 11:12:19 +0100 |
commit | 732b39507b21833511ea465964f66452d70336a8 (patch) | |
tree | f0b5cc0955ca1542997162f57396803242afd5f7 /src | |
parent | 8962e9a239dae28b59f09dfb8faa3e8704ecc034 (diff) | |
download | external_mesa3d-732b39507b21833511ea465964f66452d70336a8.zip external_mesa3d-732b39507b21833511ea465964f66452d70336a8.tar.gz external_mesa3d-732b39507b21833511ea465964f66452d70336a8.tar.bz2 |
egl: add check that eglCreateContext gets a valid config
Fixes following dEQP test:
dEQP-EGL.functional.negative_api.create_context
v2: don't break EGL_KHR_no_config_context (Eric Engestrom)
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Cc: "12.0 13.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 5876f3c85a61d73bb4863331bd641152a40a7b0c)
Diffstat (limited to 'src')
-rw-r--r-- | src/egl/main/eglapi.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c index d8bd76d..9db9964 100644 --- a/src/egl/main/eglapi.c +++ b/src/egl/main/eglapi.c @@ -734,7 +734,9 @@ eglCreateContext(EGLDisplay dpy, EGLConfig config, EGLContext share_list, _EGL_CHECK_DISPLAY(disp, EGL_NO_CONTEXT, drv); - if (!config && !disp->Extensions.KHR_no_config_context) + if (config != EGL_NO_CONFIG_KHR) + _EGL_CHECK_CONFIG(disp, conf, EGL_NO_CONTEXT, drv); + else if (!disp->Extensions.KHR_no_config_context) RETURN_EGL_ERROR(disp, EGL_BAD_CONFIG, EGL_NO_CONTEXT); if (!share && share_list != EGL_NO_CONTEXT) |