[Mesa-stable] [Mesa-dev] [PATCH] egl: Fix OpenGL ES version checks in _eglParseContextAttribList()

Ian Romanick idr at freedesktop.org
Wed Jul 30 10:17:06 PDT 2014


On 06/18/2014 05:49 PM, Anuj Phogat wrote:
> Fixes gles3 Khronos CTS test:
> egl_create_context.egl_create_context

Gak... I totally missed this when you sent it a month ago. :(

> Cc: <mesa-stable at lists.freedesktop.org>
> Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
> ---
>  src/egl/main/eglcontext.c | 11 ++++++++---
>  1 file changed, 8 insertions(+), 3 deletions(-)
> 
> diff --git a/src/egl/main/eglcontext.c b/src/egl/main/eglcontext.c
> index 70277ab..b8b30cb 100644
> --- a/src/egl/main/eglcontext.c
> +++ b/src/egl/main/eglcontext.c
> @@ -322,10 +322,15 @@ _eglParseContextAttribList(_EGLContext *ctx, _EGLDisplay *dpy,
>           break;
>  
>        case 3:
> -      default:
> -         /* Don't put additional version checks here.  We don't know that
> -          * there won't be versions > 3.0.
> +         /* Update this condition if new OpenGL ES 3.x (x > 1) version is
> +          * announced.
>            */
> +         if (ctx->ClientMinorVersion > 1)
> +            err = EGL_BAD_MATCH;
> +         break;

I'm not sure this is the right place for this check.  The checks in
eglcontext.c are supposed to be for things that can never be valid.
Things that could be valid get passed to the driver.  If the driver
can't do GLES 3.14159265359 or 4.0, it should reject it.

Is just the wrong error being generated?

> +
> +      default:
> +         err = EGL_BAD_MATCH;
>           break;
>        }
>     }
> 



More information about the mesa-stable mailing list