diff --git a/src/broadcom/common/v3d_debug.c b/src/broadcom/common/v3d_debug.c index 254106784a7..caa2f305f1d 100644 --- a/src/broadcom/common/v3d_debug.c +++ b/src/broadcom/common/v3d_debug.c @@ -98,6 +98,8 @@ static const struct debug_named_value debug_control[] = { #endif { "no_merge_jobs", V3D_DEBUG_NO_MERGE_JOBS, "Don't try to merge subpasses in the same job even if they share framebuffer configuration (v3dv only)" }, + { "opt_compile_time", V3D_DEBUG_OPT_COMPILE_TIME, + "Don't try to reduce shader spilling, might improve compile times with expensive shaders." }, DEBUG_NAMED_VALUE_END }; diff --git a/src/broadcom/common/v3d_debug.h b/src/broadcom/common/v3d_debug.h index df186605560..e5e6a6356cb 100644 --- a/src/broadcom/common/v3d_debug.h +++ b/src/broadcom/common/v3d_debug.h @@ -68,6 +68,7 @@ extern uint32_t v3d_mesa_debug; #define V3D_DEBUG_DOUBLE_BUFFER (1 << 22) #define V3D_DEBUG_CACHE (1 << 23) #define V3D_DEBUG_NO_MERGE_JOBS (1 << 24) +#define V3D_DEBUG_OPT_COMPILE_TIME (1 << 25) #define V3D_DEBUG_SHADERS (V3D_DEBUG_TGSI | V3D_DEBUG_NIR | \ V3D_DEBUG_VIR | V3D_DEBUG_QPU | \ diff --git a/src/broadcom/compiler/vir.c b/src/broadcom/compiler/vir.c index 8f199dd341f..94550904ef1 100644 --- a/src/broadcom/compiler/vir.c +++ b/src/broadcom/compiler/vir.c @@ -1853,7 +1853,8 @@ uint64_t *v3d_compile(const struct v3d_compiler *compiler, */ if (c->compilation_result == V3D_COMPILATION_SUCCEEDED) { if (c->spills == 0 || - strategies[strat].min_threads == 4) { + strategies[strat].min_threads == 4 || + V3D_DBG(OPT_COMPILE_TIME)) { best_c = c; break; } else if (c->spills + c->fills <