summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/svga
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2019-05-01 15:49:44 -0600
committerBrian Paul <[email protected]>2019-05-02 06:09:35 -0600
commitf0f7c3b03a93f1e2f6c15262585af774013c6031 (patch)
tree3ae9153eed309733bbc5b15de2b85f009e5ee5a4 /src/gallium/drivers/svga
parent9c5f407b0b44a05a52d55ec34d028a1f2a901064 (diff)
svga: add SVGA_NO_LOGGING env var (v2)
valgrind crashes when we try to initialize host logging. This env var can be used to disable logging. v2: rebase onto "svga: move host logging to winsys". Cc: [email protected] Reviewed-by: Neha Bhende <[email protected]>
Diffstat (limited to 'src/gallium/drivers/svga')
-rw-r--r--src/gallium/drivers/svga/svga_screen.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/gallium/drivers/svga/svga_screen.c b/src/gallium/drivers/svga/svga_screen.c
index 664b9bf615d..f747ff78bcf 100644
--- a/src/gallium/drivers/svga/svga_screen.c
+++ b/src/gallium/drivers/svga/svga_screen.c
@@ -917,6 +917,16 @@ init_logging(struct pipe_screen *screen)
}
+/**
+ * no-op logging function to use when SVGA_NO_LOGGING is set.
+ */
+static void
+nop_host_log(struct svga_winsys_screen *sws, const char *message)
+{
+ /* nothing */
+}
+
+
static void
svga_destroy_screen( struct pipe_screen *screen )
{
@@ -1134,7 +1144,11 @@ 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) == TRUE) {
+ svgascreen->sws->host_log = nop_host_log;
+ } else {
+ init_logging(screen);
+ }
return screen;
error2: