[Mesa-dev] [PATCH 2/2] st/glx: add support for GLX_ARB_create_context_no_error

Adam Jackson ajax at redhat.com
Thu Aug 31 15:41:08 UTC 2017


On Thu, 2017-08-03 at 20:07 +0200, Grigori Goronzy wrote:

> diff --git a/src/gallium/state_trackers/glx/xlib/xm_api.c b/src/gallium/state_trackers/glx/xlib/xm_api.c
> index 828253b..508db5c 100644
> --- a/src/gallium/state_trackers/glx/xlib/xm_api.c
> +++ b/src/gallium/state_trackers/glx/xlib/xm_api.c
> @@ -952,7 +952,8 @@ xmesa_init( Display *display )
>  PUBLIC
>  XMesaContext XMesaCreateContext( XMesaVisual v, XMesaContext share_list,
>                                   GLuint major, GLuint minor,
> -                                 GLuint profileMask, GLuint contextFlags)
> +                                 GLuint profileMask, GLuint contextFlags,
> +                                 GLboolean noError)
>  {
>     XMesaDisplay xmdpy = xmesa_init_display(v->display);
>     struct st_context_attribs attribs;
> @@ -970,6 +971,7 @@ XMesaContext XMesaCreateContext( XMesaVisual v, XMesaContext share_list,
>     c->xm_visual = v;
>     c->xm_buffer = NULL;   /* set later by XMesaMakeCurrent */
>     c->xm_read_buffer = NULL;
> +   c->no_error = noError;
>  
>     memset(&attribs, 0, sizeof(attribs));
>     attribs.visual = v->stvis;
> @@ -981,6 +983,8 @@ XMesaContext XMesaCreateContext( XMesaVisual v, XMesaContext share_list,
>        attribs.flags |= ST_CONTEXT_FLAG_DEBUG;
>     if (contextFlags & GLX_CONTEXT_ROBUST_ACCESS_BIT_ARB)
>        attribs.flags |= ST_CONTEXT_FLAG_ROBUST_ACCESS;
> +   if (noError)
> +      attribs.flags |= ST_CONTEXT_FLAG_NO_ERROR;
>  
>     switch (profileMask) {
>     case GLX_CONTEXT_CORE_PROFILE_BIT_ARB:

This seems weird to me. Why add an argument when there's already a flag
bit for this?

- ajax


More information about the mesa-dev mailing list