From 9e7112f4dfb7a9cbbfe20da0e0ed931807c38bea Mon Sep 17 00:00:00 2001 From: Gert Wollny Date: Tue, 9 Apr 2024 13:44:14 +0200 Subject: [PATCH] llvmpipe: Don't emit certain debug code when TSAN is enabled It produces race conditions and is probably not interesting when running TSAN. v2: use #if and define values instead of "#if defined" (Yonggang Luo) v3: remove some leftover text v4: drop ws changes (Yonggang Luo) Signed-off-by: Gert Wollny Part-of: --- src/gallium/drivers/llvmpipe/lp_perf.h | 2 +- src/gallium/drivers/llvmpipe/lp_rast_priv.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/llvmpipe/lp_perf.h b/src/gallium/drivers/llvmpipe/lp_perf.h index 15483cb0b52..8552b02b19d 100644 --- a/src/gallium/drivers/llvmpipe/lp_perf.h +++ b/src/gallium/drivers/llvmpipe/lp_perf.h @@ -75,7 +75,7 @@ extern struct lp_counters lp_count; /** Increment the named counter (only for debug builds) */ -#if MESA_DEBUG +#if MESA_DEBUG && !THREAD_SANITIZER #define LP_COUNT(counter) lp_count.counter++ #define LP_COUNT_ADD(counter, incr) lp_count.counter += (incr) #define LP_COUNT_GET(counter) (lp_count.counter) diff --git a/src/gallium/drivers/llvmpipe/lp_rast_priv.h b/src/gallium/drivers/llvmpipe/lp_rast_priv.h index fb7cd853afb..48407cef1b2 100644 --- a/src/gallium/drivers/llvmpipe/lp_rast_priv.h +++ b/src/gallium/drivers/llvmpipe/lp_rast_priv.h @@ -45,7 +45,7 @@ /* If we crash in a jitted function, we can examine jit_line and jit_state * to get some info. This is not thread-safe, however. */ -#if MESA_DEBUG +#if MESA_DEBUG && !THREAD_SANITIZER struct lp_rasterizer_task; extern int jit_line;