From 5d217774f2cfbdcba0ae90c28b82201fbcdc12e6 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Thu, 25 Feb 2021 09:12:54 -0800 Subject: [PATCH] freedreno/ir3: Fix initial_variants_synchronous() condition This was meant to be an || rather than &&, although it didn't matter for shaderdb because both conditions would be true. But it did matter if you were trying to force synchronous compile to avoid having nir/ir3 prints interleaved from multiple threads. While at it, add a more specific debug flag to force initial variant compile to be synchronous, because at some point the 'shaderdb' flag itself will not force this. Fixes: 75b0c4b5e1e ("freedreno/ir3: Async shader compile") Signed-off-by: Rob Clark Part-of: --- src/gallium/drivers/freedreno/freedreno_screen.c | 4 ++-- src/gallium/drivers/freedreno/freedreno_util.h | 2 +- src/gallium/drivers/freedreno/ir3/ir3_gallium.c | 4 +++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c b/src/gallium/drivers/freedreno/freedreno_screen.c index 133e774791b..ed5c007c0ef 100644 --- a/src/gallium/drivers/freedreno/freedreno_screen.c +++ b/src/gallium/drivers/freedreno/freedreno_screen.c @@ -74,8 +74,8 @@ static const struct debug_named_value fd_debug_options[] = { {"nobypass", FD_DBG_NOBYPASS, "Disable GMEM bypass"}, {"perf", FD_DBG_PERF, "Enable performance warnings"}, {"nobin", FD_DBG_NOBIN, "Disable hw binning"}, - {"nogmem", FD_DBG_NOGMEM, "Disable GMEM rendering (bypass only)"}, - /* BIT(10) */ + {"nogmem", FD_DBG_NOGMEM, "Disable GMEM rendering (bypass only)"}, + {"serialc", FD_DBG_SERIALC,"Disable asynchronous shader compile"}, {"shaderdb", FD_DBG_SHADERDB, "Enable shaderdb output"}, {"flush", FD_DBG_FLUSH, "Force flush after every draw"}, {"deqp", FD_DBG_DEQP, "Enable dEQP hacks"}, diff --git a/src/gallium/drivers/freedreno/freedreno_util.h b/src/gallium/drivers/freedreno/freedreno_util.h index 4ed8b4b5039..71d7085a2c4 100644 --- a/src/gallium/drivers/freedreno/freedreno_util.h +++ b/src/gallium/drivers/freedreno/freedreno_util.h @@ -72,7 +72,7 @@ enum fd_debug_flag { FD_DBG_PERF = BITFIELD_BIT(7), FD_DBG_NOBIN = BITFIELD_BIT(8), FD_DBG_NOGMEM = BITFIELD_BIT(9), - /* BIT(10) */ + FD_DBG_SERIALC = BITFIELD_BIT(10), FD_DBG_SHADERDB = BITFIELD_BIT(11), FD_DBG_FLUSH = BITFIELD_BIT(12), FD_DBG_DEQP = BITFIELD_BIT(13), diff --git a/src/gallium/drivers/freedreno/ir3/ir3_gallium.c b/src/gallium/drivers/freedreno/ir3/ir3_gallium.c index 8926f7bca9b..13f650ae4fc 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_gallium.c +++ b/src/gallium/drivers/freedreno/ir3/ir3_gallium.c @@ -67,7 +67,9 @@ struct ir3_shader_state { static bool initial_variants_synchronous(struct fd_context *ctx) { - return unlikely(ctx->debug.debug_message && (fd_mesa_debug & FD_DBG_SHADERDB)); + return unlikely(ctx->debug.debug_message || + (fd_mesa_debug & FD_DBG_SHADERDB)) || + (fd_mesa_debug & FD_DBG_SERIALC); } static void