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

Johannes Obermayr johannesobermayr at gmx.de
Tue Aug 26 13:47:51 PDT 2014


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



More information about the mesa-stable mailing list