[Mesa-stable] [PATCH] Suppress any "libGL:..." warnings when LIBGL_DEBUG == "quiet"

Courtney Goeltzenleuchter courtney at lunarg.com
Mon Sep 8 14:30:25 PDT 2014


Looks good to me. Matches what ErrorMessageF is doing.

Reviewed-by: Courtney Goeltzenleuchter <courtney at lunarg.com>

On Tue, Aug 26, 2014 at 2:47 PM, Johannes Obermayr <johannesobermayr at gmx.de>
wrote:

> From: Stefan Dirsch <sndirsch at suse.de>
>
> Let's handle LIBGL_DEBUG env. variable in Mesa in a consistent way.
>
> Fixes: https://bugzilla.novell.com/show_bug.cgi?id=892896
> ---
> To: mesa-dev at lists.freedesktop.org
> Cc: "10.3" <mesa-stable at lists.freedesktop.org>
> openSUSE maintainers: Why can't you forward your applied u_* patches to
> upstream
>                       to get them included in final/next release?
> ---
>  src/mesa/drivers/dri/common/xmlconfig.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/src/mesa/drivers/dri/common/xmlconfig.c
> b/src/mesa/drivers/dri/common/xmlconfig.c
> index ce37647..8e48522 100644
> --- a/src/mesa/drivers/dri/common/xmlconfig.c
> +++ b/src/mesa/drivers/dri/common/xmlconfig.c
> @@ -429,8 +429,10 @@ static void
>  __driUtilMessage(const char *f, ...)
>  {
>      va_list args;
> +    const char *libgl_debug;
>
> -    if (getenv("LIBGL_DEBUG")) {
> +    libgl_debug=getenv("LIBGL_DEBUG");
> +    if (libgl_debug && !strstr(libgl_debug, "quiet")) {
>          fprintf(stderr, "libGL: ");
>          va_start(args, f);
>          vfprintf(stderr, f, args);
> --
> 2.0.4
>
> _______________________________________________
> mesa-stable mailing list
> mesa-stable at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-stable
>



-- 
Courtney Goeltzenleuchter
LunarG
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-stable/attachments/20140908/b198518e/attachment.html>


More information about the mesa-stable mailing list