mesa: don't print GL errors in release builds if MESA_DEBUG=silent

Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6946>
This commit is contained in:
Marek Olšák 2020-09-27 16:56:40 -04:00 committed by Marge Bot
parent eda37fb269
commit 9281dfca3f

View file

@ -66,8 +66,8 @@ output_if_debug(const char *prefixString, const char *outputString,
else
debug = 1;
#else
/* in release builds, be silent unless MESA_DEBUG is set */
debug = getenv("MESA_DEBUG") != NULL;
const char *env = getenv("MESA_DEBUG");
debug = env && strstr(env, "silent") == NULL;
#endif
}