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 <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4765>
This commit is contained in:

committed by
Marge Bot

parent
6ff94735c9
commit
57f4c66028
@@ -368,8 +368,8 @@ one_time_fini(void)
|
|||||||
*
|
*
|
||||||
* \sa _math_init().
|
* \sa _math_init().
|
||||||
*/
|
*/
|
||||||
static void
|
void
|
||||||
one_time_init(void)
|
_mesa_initialize(void)
|
||||||
{
|
{
|
||||||
static bool initialized;
|
static bool initialized;
|
||||||
|
|
||||||
@@ -1204,7 +1204,7 @@ _mesa_initialize_context(struct gl_context *ctx,
|
|||||||
_mesa_override_gl_version(ctx);
|
_mesa_override_gl_version(ctx);
|
||||||
|
|
||||||
/* misc one-time initializations */
|
/* misc one-time initializations */
|
||||||
one_time_init();
|
_mesa_initialize();
|
||||||
|
|
||||||
/* Plug in driver functions and context pointer here.
|
/* Plug in driver functions and context pointer here.
|
||||||
* This is important because when we call alloc_shared_state() below
|
* This is important because when we call alloc_shared_state() below
|
||||||
|
@@ -107,6 +107,9 @@ _mesa_destroy_visual( struct gl_config *vis );
|
|||||||
/** \name Context-related functions */
|
/** \name Context-related functions */
|
||||||
/*@{*/
|
/*@{*/
|
||||||
|
|
||||||
|
extern void
|
||||||
|
_mesa_initialize(void);
|
||||||
|
|
||||||
extern GLboolean
|
extern GLboolean
|
||||||
_mesa_initialize_context( struct gl_context *ctx,
|
_mesa_initialize_context( struct gl_context *ctx,
|
||||||
gl_api api,
|
gl_api api,
|
||||||
|
Reference in New Issue
Block a user