nouveau: call glsl_type_singleton_init_or_ref earlier

Fixes: 91029b7e87 ("nouveau: take glsl_type ref unconditionally")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27853>
(cherry picked from commit 1a4c2cba95)
This commit is contained in:
Karol Herbst 2024-02-28 17:42:57 +01:00 committed by Eric Engestrom
parent b106553008
commit b71cae2608
2 changed files with 3 additions and 3 deletions

View file

@ -324,7 +324,7 @@
"description": "nouveau: call glsl_type_singleton_init_or_ref earlier",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "91029b7e87bba2a28aeb202cdf920d6ec6a70fa7",
"notes": null

View file

@ -291,6 +291,8 @@ nouveau_screen_init(struct nouveau_screen *screen, struct nouveau_device *dev)
void *data;
union nouveau_bo_config mm_config;
glsl_type_singleton_init_or_ref();
char *nv_dbg = getenv("NOUVEAU_MESA_DEBUG");
if (nv_dbg)
nouveau_mesa_debug = atoi(nv_dbg);
@ -442,8 +444,6 @@ nouveau_screen_init(struct nouveau_screen *screen, struct nouveau_device *dev)
&mm_config);
screen->mm_VRAM = nouveau_mm_create(dev, NOUVEAU_BO_VRAM, &mm_config);
glsl_type_singleton_init_or_ref();
return 0;
err: