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 <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17976>
This commit is contained in:
Marek Olšák 2022-08-09 20:41:01 -04:00 committed by Marge Bot
parent 7361b67f92
commit f81d4b7649

View File

@ -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;