From e4cdce50585edbbbe9b6fe0d3f7215a67b989309 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Tue, 24 Oct 2017 15:47:41 +0100 Subject: [PATCH] mesa: remove duplicate 'disabled extensions' list 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 Signed-off-by: Emil Velikov Reviewed-by: Brian Paul --- 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.30.2