From b71cae260882234364e6b8628a91a9d6d0de8425 Mon Sep 17 00:00:00 2001 From: Karol Herbst Date: Wed, 28 Feb 2024 17:42:57 +0100 Subject: [PATCH] nouveau: call glsl_type_singleton_init_or_ref earlier Fixes: 91029b7e87b ("nouveau: take glsl_type ref unconditionally") Signed-off-by: Karol Herbst Acked-by: Faith Ekstrand Reviewed-by: Dave Airlie Part-of: (cherry picked from commit 1a4c2cba956fe593a0fc09416bd8142a5a34423f) --- .pick_status.json | 2 +- src/gallium/drivers/nouveau/nouveau_screen.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index e5ba3fa11aa..8d887b3f5c0 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -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 diff --git a/src/gallium/drivers/nouveau/nouveau_screen.c b/src/gallium/drivers/nouveau/nouveau_screen.c index 22924204514..a4d0a179baa 100644 --- a/src/gallium/drivers/nouveau/nouveau_screen.c +++ b/src/gallium/drivers/nouveau/nouveau_screen.c @@ -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: