From 77713a0acb09f475d29f90375777e34dbd1bb02a Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Wed, 6 Sep 2017 14:24:02 +0000 Subject: [PATCH] mesa: allow user to set MESA_NO_ERROR=0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102530 Cc: Michel Dänzer Cc: Alexandre Demers Signed-off-by: Eric Engestrom Reviewed-by: Timothy Arceri Reviewed-by: Nicolai Hähnle Reviewed-by: Michel Dänzer --- src/mesa/main/context.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index cc37a0dc4dc..dad3ab39f84 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -123,6 +123,7 @@ #include "shared.h" #include "shaderobj.h" #include "shaderimage.h" +#include "util/debug.h" #include "util/disk_cache.h" #include "util/strtod.h" #include "stencil.h" @@ -1217,7 +1218,7 @@ _mesa_initialize_context(struct gl_context *ctx, /* KHR_no_error is likely to crash, overflow memory, etc if an application * has errors so don't enable it for setuid processes. */ - if (getenv("MESA_NO_ERROR")) { + if (env_var_as_boolean("MESA_NO_ERROR", false)) { #if !defined(_WIN32) if (geteuid() == getuid()) #endif -- 2.30.2