Module: Mesa Branch: main Commit: f81d4b76492497ee2beb2c360df849bd7a292294 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f81d4b76492497ee2beb2c360df849bd7a292294
Author: Marek Olšák <[email protected]> Date: Tue Aug 9 20:41:01 2022 -0400 util/xmlconfig: allow drivers to override option values This corrects the issue that we can't have DRI_CONF_MESA_GLTHREAD(false) in gallium and then DRI_CONF_MESA_GLTHREAD(true) in drivers. Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17976> --- src/util/xmlconfig.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/util/xmlconfig.c b/src/util/xmlconfig.c index 491dc4be64b..855b869d8b1 100644 --- a/src/util/xmlconfig.c +++ b/src/util/xmlconfig.c @@ -347,7 +347,10 @@ driParseOptionInfo(driOptionCache *info, driOptionInfo *optinfo = &info->info[i]; driOptionValue *optval = &info->values[i]; - assert(!optinfo->name); /* No duplicate options in your list. */ + if (optinfo->name) { + /* Duplicate options override the value, but the type must match. */ + assert(optinfo->type == opt->info.type); + } optinfo->type = opt->info.type; optinfo->range = opt->info.range;
