[Mesa-dev] [PATCH] egl: fix OpenGL 3.1 context creation

Kenneth Graunke kenneth at whitecape.org
Fri Aug 2 06:50:45 UTC 2019


On Thursday, August 1, 2019 6:38:45 PM PDT Timothy Arceri wrote:
> From the EGL_KHR_create_context spec:
> 
>    "* If OpenGL 3.1 is requested, the context returned may implement
>        any of the following versions:
> 
>          * Version 3.1. The GL_ARB_compatibility extension may or may
>            not be implemented, as determined by the implementation.
>          * The core profile of version 3.2 or greater."
> 
> Fixes CTS tests:
> 
>     dEQP-EGL.functional.create_context_ext.gl_31.rgb888_depth_stencil
>     dEQP-EGL.functional.create_context_ext.robust_gl_31.rgb888_depth_stencil
>     dEQP-EGL.functional.create_context_ext.gl_31.rgb888_depth_no_stencil
>     dEQP-EGL.functional.create_context_ext.robust_gl_31.rgb888_depth_no_stencil
>     dEQP-EGL.functional.create_context_ext.gl_31.rgba8888_depth_no_stencil
>     dEQP-EGL.functional.create_context_ext.gl_31.rgb888_no_depth_no_stencil
>     dEQP-EGL.functional.create_context_ext.robust_gl_31.rgba8888_depth_no_stencil
>     dEQP-EGL.functional.create_context_ext.robust_gl_31.rgb888_no_depth_no_stencil
>     dEQP-EGL.functional.create_context_ext.gl_31.rgba8888_no_depth_no_stencil
>     dEQP-EGL.functional.create_context_ext.robust_gl_31.rgba8888_no_depth_no_stencil
>     dEQP-EGL.functional.create_context_ext.gl_31.rgba8888_depth_stencil
>     dEQP-EGL.functional.create_context_ext.robust_gl_31.rgba8888_depth_stencil
> ---
>  src/egl/drivers/dri2/egl_dri2.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
> index c712c106b06..918d61a1e9b 100644
> --- a/src/egl/drivers/dri2/egl_dri2.c
> +++ b/src/egl/drivers/dri2/egl_dri2.c
> @@ -1245,6 +1245,9 @@ dri2_create_context(_EGLDriver *drv, _EGLDisplay *disp, _EGLConfig *conf,
>                 && dri2_ctx->base.ClientMinorVersion >= 2))
>            && dri2_ctx->base.Profile == EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT_KHR)
>           api = __DRI_API_OPENGL_CORE;
> +      else if (dri2_ctx->base.ClientMajorVersion == 3 &&
> +               dri2_ctx->base.ClientMinorVersion == 1)
> +         api = __DRI_API_OPENGL_CORE;
>        else
>           api = __DRI_API_OPENGL;
>        break;
> 

Good find!

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20190801/78197f04/attachment.sig>


More information about the mesa-dev mailing list