From decc040abe23eef0095b1557dfb9b13be49f785d Mon Sep 17 00:00:00 2001 From: David Heidelberg Date: Sun, 9 Jun 2024 21:50:32 -0700 Subject: [PATCH] intel/debug: allow silencing CL warnings Useful for CI and users previously aware of the warning. Reviewed-by: Kenneth Graunke Signed-off-by: David Heidelberg Part-of: --- docs/envvars.rst | 2 ++ src/gallium/drivers/iris/iris_screen.c | 2 +- src/intel/dev/intel_debug.c | 1 + src/intel/dev/intel_debug.h | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/envvars.rst b/docs/envvars.rst index 23ddea6f94c..c8780521293 100644 --- a/docs/envvars.rst +++ b/docs/envvars.rst @@ -631,6 +631,8 @@ Intel driver environment variables dump shader assembly for vertex shaders ``wm`` dump shader assembly for fragment shaders (same as ``fs``) + ``cl-quiet`` + quiets the OpenCL warnings recommending use of Intel compute-runtime .. envvar:: INTEL_DECODE diff --git a/src/gallium/drivers/iris/iris_screen.c b/src/gallium/drivers/iris/iris_screen.c index 3dbbe48360c..b2dbc235ea5 100644 --- a/src/gallium/drivers/iris/iris_screen.c +++ b/src/gallium/drivers/iris/iris_screen.c @@ -126,7 +126,7 @@ static void iris_warn_cl() { static bool warned = false; - if (warned) + if (warned || INTEL_DEBUG(DEBUG_CL_QUIET)) return; warned = true; diff --git a/src/intel/dev/intel_debug.c b/src/intel/dev/intel_debug.c index 6f46c7bb005..3a18f03d6d4 100644 --- a/src/intel/dev/intel_debug.c +++ b/src/intel/dev/intel_debug.c @@ -107,6 +107,7 @@ static const struct debug_control debug_control[] = { { "bat-stats", DEBUG_BATCH_STATS }, { "reg-pressure", DEBUG_REG_PRESSURE }, { "shader-print", DEBUG_SHADER_PRINT }, + { "cl-quiet", DEBUG_CL_QUIET }, { NULL, 0 } }; diff --git a/src/intel/dev/intel_debug.h b/src/intel/dev/intel_debug.h index da0d32a8151..4b75cfafa51 100644 --- a/src/intel/dev/intel_debug.h +++ b/src/intel/dev/intel_debug.h @@ -98,6 +98,7 @@ extern uint64_t intel_debug; #define DEBUG_BATCH_STATS (1ull << 50) #define DEBUG_REG_PRESSURE (1ull << 51) #define DEBUG_SHADER_PRINT (1ull << 52) +#define DEBUG_CL_QUIET (1ull << 53) #define DEBUG_ANY (~0ull)