[Mesa-stable] [PATCH] svga: add SVGA_NO_LOGGING env var

Brian Paul brianp at vmware.com
Wed May 1 16:48:10 UTC 2019


valgrind crashes when we try to initialize host logging.  This
env var can be used to disable logging.

Cc: mesa-stable at lists.freedesktop.org
---
 docs/envvars.html                      | 3 +++
 src/gallium/drivers/svga/svga_screen.c | 4 +++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/docs/envvars.html b/docs/envvars.html
index c9733e6..43d3a6c 100644
--- a/docs/envvars.html
+++ b/docs/envvars.html
@@ -338,6 +338,9 @@ See src/mesa/state_tracker/st_debug.c for other options.
 for details.
 <li>SVGA_EXTRA_LOGGING - if set, enables extra logging to the vmware.log file,
 such as the OpenGL program's name and command line arguments.
+<li>SVGA_NO_LOGGING - if set, disables logging to the vmware.log file.
+This is useful when using Valgrind because it otherwise crashes when
+initializing the host log feature.
 <li>See the driver code for other, lesser-used variables.
 </ul>
 
diff --git a/src/gallium/drivers/svga/svga_screen.c b/src/gallium/drivers/svga/svga_screen.c
index 6cb5a14..8158950 100644
--- a/src/gallium/drivers/svga/svga_screen.c
+++ b/src/gallium/drivers/svga/svga_screen.c
@@ -1134,7 +1134,9 @@ svga_screen_create(struct svga_winsys_screen *sws)
 
    svga_screen_cache_init(svgascreen);
 
-   init_logging(screen);
+   if (debug_get_bool_option("SVGA_NO_LOGGING", FALSE) == FALSE) {
+      init_logging(screen);
+   }
 
    return screen;
 error2:
-- 
1.8.5.6



More information about the mesa-stable mailing list