[Mesa-dev] [PATCH 05/13] mesa: remove duplicate 'disabled extensions' list

Emil Velikov emil.l.velikov at gmail.com
Tue Nov 7 11:54:45 UTC 2017


From: Emil Velikov <emil.velikov at collabora.com>

While parsing MESA_EXTENSION_OVERRIDE we keep track of the disabled
extensions, twice - in _mesa_extension_override_disables and
disabled_extensions.

Upon context creation, we use the former to modify the extensions list.
Yet, we still check the updated list against disabled_extensions.

Remove disabled_extensions, it's obsolete.

Cc: Jordan Justen <jordan.l.justen at intel.com>
Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
---
 src/mesa/main/extensions.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
index 13a72b111d5..87f60d58c67 100644
--- a/src/mesa/main/extensions.c
+++ b/src/mesa/main/extensions.c
@@ -48,8 +48,6 @@ static char *extra_extensions = NULL;
  */
 #define o(x) offsetof(struct gl_extensions, x)
 
-static bool disabled_extensions[MESA_EXTENSION_COUNT];
-
 /**
  * Given an extension name, lookup up the corresponding member of struct
  * gl_extensions and return that member's index.  If the name is
@@ -298,9 +296,6 @@ _mesa_one_time_init_extension_overrides(void)
          recognized = false;
       }
 
-      if (i >= 0)
-         disabled_extensions[i] = !enable;
-
       if (!recognized && enable) {
          strcat(extra_extensions, ext);
          strcat(extra_extensions, " ");
@@ -357,8 +352,7 @@ _mesa_extension_supported(const struct gl_context *ctx, extension_index i)
    const bool *base = (bool *) &ctx->Extensions;
    const struct mesa_extension *ext = _mesa_extension_table + i;
 
-   return !disabled_extensions[i] &&
-          (ctx->Version >= ext->version[ctx->API]) && base[ext->offset];
+   return (ctx->Version >= ext->version[ctx->API]) && base[ext->offset];
 }
 
 /**
-- 
2.14.1



More information about the mesa-dev mailing list