diff options
author | Erik Faye-Lund <[email protected]> | 2020-04-24 14:47:23 +0200 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-04-27 20:40:01 +0000 |
commit | 9bc98778a4792e260e1f6d9000fda54734a48860 (patch) | |
tree | 4808bb72af7b04ceca3abdacdd256d105de21cf3 | |
parent | 05c69752cfda9e66130c64c01f0c8fac613c83ad (diff) |
mesa/main: do not pass context to one-time extension init
_mesa_problem doesn't use the ctx argument for anything, so there's no
reason to pass it. This saves us from needing a context passed down this
code-path in the first place.
Reviewed-by: Marek Olšák <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4765>
-rw-r--r-- | src/mesa/main/context.c | 2 | ||||
-rw-r--r-- | src/mesa/main/extensions.c | 10 | ||||
-rw-r--r-- | src/mesa/main/extensions.h | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index cc6d55d555a..958ac8cb8f0 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -388,7 +388,7 @@ one_time_init( struct gl_context *ctx ) _mesa_locale_init(); - _mesa_one_time_init_extension_overrides(ctx); + _mesa_one_time_init_extension_overrides(); _mesa_get_cpu_features(); diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c index 016a55a2ed7..6ded1bb4269 100644 --- a/src/mesa/main/extensions.c +++ b/src/mesa/main/extensions.c @@ -236,7 +236,7 @@ free_unknown_extensions_strings(void) * - Collect unrecognized extension names in a new string. */ void -_mesa_one_time_init_extension_overrides(struct gl_context *ctx) +_mesa_one_time_init_extension_overrides(void) { const char *env_const = getenv("MESA_EXTENSION_OVERRIDE"); char *env; @@ -289,14 +289,14 @@ _mesa_one_time_init_extension_overrides(struct gl_context *ctx) if (!warned) { warned = true; - _mesa_problem(ctx, "Trying to enable too many unknown extension. " - "Only the first %d will be honoured", - MAX_UNRECOGNIZED_EXTENSIONS); + _mesa_problem(NULL, "Trying to enable too many unknown extension. " + "Only the first %d will be honoured", + MAX_UNRECOGNIZED_EXTENSIONS); } } else { unrecognized_extensions.names[unknown_ext] = ext; unknown_ext++; - _mesa_problem(ctx, "Trying to enable unknown extension: %s", ext); + _mesa_problem(NULL, "Trying to enable unknown extension: %s", ext); } } } diff --git a/src/mesa/main/extensions.h b/src/mesa/main/extensions.h index 705d65dcdb5..303929baabc 100644 --- a/src/mesa/main/extensions.h +++ b/src/mesa/main/extensions.h @@ -47,7 +47,7 @@ struct gl_extensions; extern void _mesa_enable_sw_extensions(struct gl_context *ctx); -extern void _mesa_one_time_init_extension_overrides(struct gl_context *ctx); +extern void _mesa_one_time_init_extension_overrides(void); extern void _mesa_init_extensions(struct gl_extensions *extentions); |