aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorErik Faye-Lund <[email protected]>2020-04-24 15:27:13 +0200
committerMarge Bot <[email protected]>2020-04-27 20:40:01 +0000
commit6ff94735c93b8fcc2a3e5c6eb668b069ac4e0a1a (patch)
tree5b0c7ff3b94faa4ce67105d1add04bd4247a99ec /src
parentac9d30431e2c670ae134e2619be9817a99101e1d (diff)
mesa/main: Do not pass context to one_time_init
There's no longer any reason to pass the context down to one_time_init, because we always do the same thing regardless of the context, and we don't change the context. Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4765>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/context.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index cf46e1d124b..bb181c6def3 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -369,14 +369,14 @@ one_time_fini(void)
* \sa _math_init().
*/
static void
-one_time_init( struct gl_context *ctx )
+one_time_init(void)
{
- static GLbitfield api_init_mask = 0x0;
+ static bool initialized;
mtx_lock(&OneTimeLock);
/* truly one-time init */
- if (!api_init_mask) {
+ if (!initialized) {
GLuint i;
STATIC_ASSERT(sizeof(GLbyte) == 1);
@@ -400,7 +400,7 @@ one_time_init( struct gl_context *ctx )
#if defined(DEBUG)
if (MESA_VERBOSE != 0) {
- _mesa_debug(ctx, "Mesa " PACKAGE_VERSION " DEBUG build" MESA_GIT_SHA1 "\n");
+ _mesa_debug(NULL, "Mesa " PACKAGE_VERSION " DEBUG build" MESA_GIT_SHA1 "\n");
}
#endif
@@ -412,7 +412,7 @@ one_time_init( struct gl_context *ctx )
_mesa_init_remap_table();
}
- api_init_mask |= 1 << ctx->API;
+ initialized = true;
mtx_unlock(&OneTimeLock);
}
@@ -1204,7 +1204,7 @@ _mesa_initialize_context(struct gl_context *ctx,
_mesa_override_gl_version(ctx);
/* misc one-time initializations */
- one_time_init(ctx);
+ one_time_init();
/* Plug in driver functions and context pointer here.
* This is important because when we call alloc_shared_state() below