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 <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28650>
This commit is contained in:
Gert Wollny 2024-04-09 13:44:14 +02:00 committed by Marge Bot
parent 7c36c4f0a4
commit 9e7112f4df
2 changed files with 2 additions and 2 deletions

View file

@ -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)

View file

@ -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;