mesa: reuse set_extension() for _mesa_extension_override_disables
authorEmil Velikov <emil.velikov@collabora.com>
Tue, 24 Oct 2017 14:57:08 +0000 (15:57 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Thu, 16 Nov 2017 14:07:14 +0000 (14:07 +0000)
We already use it for _mesa_extension_override_enables.
Improve consistency and use it for both extension lists.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/main/extensions.c

index 351ed1c4dd45f645c09033c64f1e2dd94231ce8b..2468e19bf99fd54ae23132b57decd92c03a5da30 100644 (file)
@@ -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);