aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorErik Faye-Lund <[email protected]>2020-04-24 15:34:01 +0200
committerMarge Bot <[email protected]>2020-04-27 20:40:01 +0000
commit57f4c66028786d0efc4074811db79b784c11f9b8 (patch)
treecdb7b3c222bbd129ad857be4cc8977ed62f4fb1f /src
parent6ff94735c93b8fcc2a3e5c6eb668b069ac4e0a1a (diff)
mesa/main: one_time_init() -> _mesa_initialize()
This exposes the logic inside one_time_init() as _mesa_initialize(), so drivers who needs to use functionality initialized in one_time_init earlier if they need. This means we can reliably use the GLSL type-system when compiling driver built-in shaders. 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.c6
-rw-r--r--src/mesa/main/context.h3
2 files changed, 6 insertions, 3 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index bb181c6def3..2b8becb806d 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -368,8 +368,8 @@ one_time_fini(void)
*
* \sa _math_init().
*/
-static void
-one_time_init(void)
+void
+_mesa_initialize(void)
{
static bool initialized;
@@ -1204,7 +1204,7 @@ _mesa_initialize_context(struct gl_context *ctx,
_mesa_override_gl_version(ctx);
/* misc one-time initializations */
- one_time_init();
+ _mesa_initialize();
/* Plug in driver functions and context pointer here.
* This is important because when we call alloc_shared_state() below
diff --git a/src/mesa/main/context.h b/src/mesa/main/context.h
index f2feb7f9ed4..d5b97ac4fc7 100644
--- a/src/mesa/main/context.h
+++ b/src/mesa/main/context.h
@@ -107,6 +107,9 @@ _mesa_destroy_visual( struct gl_config *vis );
/** \name Context-related functions */
/*@{*/
+extern void
+_mesa_initialize(void);
+
extern GLboolean
_mesa_initialize_context( struct gl_context *ctx,
gl_api api,