From: Emil Velikov Date: Tue, 24 Oct 2017 14:57:08 +0000 (+0100) Subject: mesa: reuse set_extension() for _mesa_extension_override_disables X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a3f82876f4471b88158074766c6115e15642d734;p=mesa.git mesa: reuse set_extension() for _mesa_extension_override_disables We already use it for _mesa_extension_override_enables. Improve consistency and use it for both extension lists. Signed-off-by: Emil Velikov Reviewed-by: Brian Paul --- diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c index 351ed1c4dd4..2468e19bf99 100644 --- a/src/mesa/main/extensions.c +++ b/src/mesa/main/extensions.c @@ -287,12 +287,11 @@ _mesa_one_time_init_extension_overrides(void) i = name_to_index(ext); offset = set_extension(&_mesa_extension_override_enables, i, enable); - if (offset != 0 && (offset != o(dummy_true) || enable != GL_FALSE)) { - ((GLboolean *) &_mesa_extension_override_disables)[offset] = !enable; + offset = set_extension(&_mesa_extension_override_disables, i, !enable); + if (offset != 0) recognized = true; - } else { + else recognized = false; - } if (!recognized && enable) { strcat(extra_extensions, ext);