[Mesa-dev] [PATCH 6/9] glx: Implement ARB_context_flush_control in drisw too

Adam Jackson ajax at redhat.com
Tue May 19 07:53:06 PDT 2015


On Tue, 2015-05-12 at 11:54 -0400, Adam Jackson wrote:
> Signed-off-by: Adam Jackson <ajax at redhat.com>

This one is still unreviewed, if anyone's interested.  It's almost
certainly too late to land this series in 10.6, but 10.7 would be nice.

- ajax

> ---
>  src/glx/drisw_glx.c | 13 +++++++++++--
>  1 file changed, 11 insertions(+), 2 deletions(-)
> 
> diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c
> index a07feb9..c2f8c4b 100644
> --- a/src/glx/drisw_glx.c
> +++ b/src/glx/drisw_glx.c
> @@ -410,7 +410,7 @@ drisw_create_context_attribs(struct glx_screen 
> *base,
>     unsigned api;
>     int reset;
>     int release;
> -   uint32_t ctx_attribs[2 * 4];
> +   uint32_t ctx_attribs[2 * 5];
>     unsigned num_ctx_attribs = 0;
>  
>     if (!psc->base.driScreen)
> @@ -434,7 +434,8 @@ drisw_create_context_attribs(struct glx_screen 
> *base,
>     if (reset != __DRI_CTX_RESET_NO_NOTIFICATION)
>        return NULL;
>  
> -   if (release != __DRI_CTX_RELEASE_BEHAVIOR_FLUSH)
> +   if (release != __DRI_CTX_RELEASE_BEHAVIOR_FLUSH &&
> +       release != __DRI_CTX_RELEASE_BEHAVIOR_NONE)
>        return NULL;
>  
>     if (shareList) {
> @@ -455,6 +456,10 @@ drisw_create_context_attribs(struct glx_screen 
> *base,
>     ctx_attribs[num_ctx_attribs++] = major_ver;
>     ctx_attribs[num_ctx_attribs++] = __DRI_CTX_ATTRIB_MINOR_VERSION;
>     ctx_attribs[num_ctx_attribs++] = minor_ver;
> +   if (release != __DRI_CTX_RELEASE_BEHAVIOR_FLUSH) {
> +       ctx_attribs[num_ctx_attribs++] = 
> __DRI_CTX_ATTRIB_RELEASE_BEHAVIOR;
> +       ctx_attribs[num_ctx_attribs++] = release;
> +   }
>  
>     if (flags != 0) {
>        ctx_attribs[num_ctx_attribs++] = __DRI_CTX_ATTRIB_FLAGS;
> @@ -641,6 +646,10 @@ driswBindExtensions(struct drisw_screen *psc, 
> const __DRIextension **extensions)
>           psc->rendererQuery = (__DRI2rendererQueryExtension *) 
> extensions[i];
>           __glXEnableDirectExtension(&psc->base, 
> "GLX_MESA_query_renderer");
>        }
> +      if (strcmp(extensions[i]->name, __DRI2_FLUSH_CONTROL) == 0) {
> +       __glXEnableDirectExtension(&psc->base,
> +                                 
>  "GLX_ARB_context_flush_control");
> +      }
>     }
>  }
>  


More information about the mesa-dev mailing list