Looks reasonable to me. Reviewed-by: Neha Bhende <[email protected]>
Regards, Neha ________________________________________ From: mesa-dev <[email protected]> on behalf of Brian Paul <[email protected]> Sent: Wednesday, May 1, 2019 9:48 AM To: [email protected] Cc: [email protected]; Neha Bhende; Deepak Singh Rawat Subject: [Mesa-dev] [PATCH] svga: add SVGA_NO_LOGGING env var valgrind crashes when we try to initialize host logging. This env var can be used to disable logging. Cc: [email protected] --- 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 _______________________________________________ mesa-dev mailing list [email protected] https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Fmesa-dev&data=02%7C01%7Cbhenden%40vmware.com%7Cfd9f3e778e56480cc64708d6ce54d0f9%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C1%7C636923261021926972&sdata=c3YZTbcPzMc5HYTO%2FB%2FGWrztCwBXhKBnB21XUfLg0n0%3D&reserved=0 _______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
