[Mesa-dev] [PATCH] egl: return correct error code for a case req ver < 3 with forward-compatible

andrey simiklit asimiklit.work at gmail.com
Tue Nov 6 11:57:33 UTC 2018


Hello,

Any updates here?

I think that I missed tag:
Reported-by: Ian Romanick <idr at freedesktop.org>
Here: https://bugzilla.freedesktop.org/show_bug.cgi?id=92552#c9

The patch for the test which will check it:
https://patchwork.freedesktop.org/patch/256432/

Thanks,
Andrii.

On Thu, Oct 11, 2018 at 2:12 PM <asimiklit.work at gmail.com> wrote:

> From: Andrii Simiklit <andrii.simiklit at globallogic.com>
>
> The EGL_KHR_create_context spec says:
>    "If an OpenGL context is requested and the values for attributes
>     EGL_CONTEXT_MAJOR_VERSION_KHR and EGL_CONTEXT_MINOR_VERSION_KHR,
>     when considered together with the value for attribute
>     EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR, specify an OpenGL
>     version and feature set that are not defined, than an
>     EGL_BAD_MATCH error is generated."
>
> This case will be correctly handled
> a bit below after a 'for' loop when we
> remove this handling.
>
> Fixes: 11cabc45b712 "egl: rework handling EGL_CONTEXT_FLAGS"
> Bugzilla: https://bugzilla.freedesktop.org/show_bug.cgi?id=92552
> Signed-off-by: Andrii Simiklit <andrii.simiklit at globallogic.com>
> ---
>  src/egl/main/eglcontext.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/egl/main/eglcontext.c b/src/egl/main/eglcontext.c
> index ecc546e113..44a4469a97 100644
> --- a/src/egl/main/eglcontext.c
> +++ b/src/egl/main/eglcontext.c
> @@ -179,7 +179,7 @@ _eglParseContextAttribList(_EGLContext *ctx,
> _EGLDisplay *dpy,
>            *     will generate an error."
>            */
>           if ((val & EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR) &&
> -             (api != EGL_OPENGL_API || ctx->ClientMajorVersion < 3)) {
> +              api != EGL_OPENGL_API) {
>              err = EGL_BAD_ATTRIBUTE;
>              break;
>           }
> --
> 2.17.1
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20181106/58ad83fb/attachment-0001.html>


More information about the mesa-dev mailing list