Mesa (main): softpipe: add missing sentinel to debug option array

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jul 7 23:38:40 UTC 2021


Module: Mesa
Branch: main
Commit: a2c92da9a1d333737c3483714de5334c33d4062f
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=a2c92da9a1d333737c3483714de5334c33d4062f

Author: Heinrich Fink <hfink at snap.com>
Date:   Tue Jul  6 20:37:52 2021 +0200

softpipe: add missing sentinel to debug option array

Add DEBUG_NAMED_VALUE_END to finalize debug option array (see
lp_screen.c). Otherwise debug_get_flags_option might attempt to read
debug_named_value::name at an offset and SIGSEGV.

Signed-off-by: Heinrich Fink <hfink at snap.com>
Fixes: 991def0edc8 ("softpipe: Convert to comma-separated SOFTPIPE_DEBUG for debug options.")
Reviewed-by: Marcin Ślusarz <marcin.slusarz at intel.com>
Reviewed-by: Emil Velikov <emil.velikov at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11742>

---

 src/gallium/drivers/softpipe/sp_screen.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/gallium/drivers/softpipe/sp_screen.c b/src/gallium/drivers/softpipe/sp_screen.c
index eecc5c1072c..cc8de0f16c1 100644
--- a/src/gallium/drivers/softpipe/sp_screen.c
+++ b/src/gallium/drivers/softpipe/sp_screen.c
@@ -55,6 +55,7 @@ static const struct debug_named_value sp_debug_options[] = {
    {"no_rast",   SP_DBG_NO_RAST,    "no-ops rasterization, for profiling purposes"},
    {"use_llvm",  SP_DBG_USE_LLVM,   "Use LLVM if available for shaders"},
    {"use_tgsi",  SP_DBG_USE_TGSI,   "Request TGSI from the API instead of NIR"},
+   DEBUG_NAMED_VALUE_END
 };
 
 int sp_debug;



More information about the mesa-commit mailing list