[Mesa-dev] [PATCH] egl: Fix predecence problem when setting __DRI_CTX_FLAG_NO_ERROR

Mark Janes mark.a.janes at intel.com
Fri Jul 14 21:59:32 UTC 2017


Tested-by: Mark Janes <mark.a.janes at intel.com>

Kenneth Graunke <kenneth at whitecape.org> writes:

> This accidentally set __DRI_CTX_FLAG_NO_ERROR whenever any flags were
> present.  Just needs extra parenthesis.
>
> Fixes: 4909519a6655 (egl: Add EGL_KHR_create_context_no_error support)
> ---
>  src/egl/drivers/dri2/egl_dri2.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
> index f632ebe2551..072494ed4ed 100644
> --- a/src/egl/drivers/dri2/egl_dri2.c
> +++ b/src/egl/drivers/dri2/egl_dri2.c
> @@ -1074,7 +1074,7 @@ dri2_fill_context_attribs(struct dri2_egl_context *dri2_ctx,
>  
>        ctx_attribs[pos++] = __DRI_CTX_ATTRIB_FLAGS;
>        ctx_attribs[pos++] = dri2_ctx->base.Flags |
> -            dri2_ctx->base.NoError ? __DRI_CTX_FLAG_NO_ERROR : 0;
> +         (dri2_ctx->base.NoError ? __DRI_CTX_FLAG_NO_ERROR : 0);
>     }
>  
>     if (dri2_ctx->base.ResetNotificationStrategy != EGL_NO_RESET_NOTIFICATION_KHR) {
> -- 
> 2.13.3
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list