[Mesa-dev] [PATCH 2/2] egl: add check that eglCreateContext gets a valid config

Eric Engestrom eric.engestrom at imgtec.com
Thu Oct 20 14:34:52 UTC 2016


On Thursday, 2016-10-20 14:55:25 +0300, Tapani Pälli wrote:
> Fixes following dEQP test:
> 
>    dEQP-EGL.functional.negative_api.create_context
> 
> Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
> ---
>  src/egl/main/eglapi.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c
> index d8bd76d..e96999c 100644
> --- a/src/egl/main/eglapi.c
> +++ b/src/egl/main/eglapi.c
> @@ -733,6 +733,7 @@ eglCreateContext(EGLDisplay dpy, EGLConfig config, EGLContext share_list,
>     _EGL_FUNC_START(disp, EGL_OBJECT_DISPLAY_KHR, NULL, EGL_NO_CONTEXT);
>  
>     _EGL_CHECK_DISPLAY(disp, EGL_NO_CONTEXT, drv);
> +   _EGL_CHECK_CONFIG(disp, conf, EGL_NO_CONTEXT, drv);

I'm pretty sure that prevents the use of EGL_KHR_no_config_context :)

>  
>     if (!config && !disp->Extensions.KHR_no_config_context)
>        RETURN_EGL_ERROR(disp, EGL_BAD_CONFIG, EGL_NO_CONTEXT);

Move the line to this `if` (ie. instead of the RETURN_EGL_ERROR here),
and you can have my:
Reviewed-by: Eric Engestrom <eric.engestrom at imgtec.com>

> -- 
> 2.7.4


More information about the mesa-dev mailing list