diff --git a/.pick_status.json b/.pick_status.json index 34eb1dea95e..8b5fe7603d7 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -6774,7 +6774,7 @@ "description": "nouveau: take glsl_type ref unconditionally", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "5889c13fcd46ef984ea0acc02bdf68a7ef552924", "notes": null diff --git a/src/gallium/drivers/nouveau/nouveau_screen.c b/src/gallium/drivers/nouveau/nouveau_screen.c index ed5759231ea..22924204514 100644 --- a/src/gallium/drivers/nouveau/nouveau_screen.c +++ b/src/gallium/drivers/nouveau/nouveau_screen.c @@ -296,9 +296,6 @@ nouveau_screen_init(struct nouveau_screen *screen, struct nouveau_device *dev) nouveau_mesa_debug = atoi(nv_dbg); screen->force_enable_cl = debug_get_bool_option("NOUVEAU_ENABLE_CL", false); - if (screen->force_enable_cl) - glsl_type_singleton_init_or_ref(); - screen->disable_fences = debug_get_bool_option("NOUVEAU_DISABLE_FENCES", false); /* These must be set before any failure is possible, as the cleanup @@ -444,6 +441,9 @@ nouveau_screen_init(struct nouveau_screen *screen, struct nouveau_device *dev) NOUVEAU_BO_GART | NOUVEAU_BO_MAP, &mm_config); screen->mm_VRAM = nouveau_mm_create(dev, NOUVEAU_BO_VRAM, &mm_config); + + glsl_type_singleton_init_or_ref(); + return 0; err: @@ -457,8 +457,7 @@ nouveau_screen_fini(struct nouveau_screen *screen) { int fd = screen->drm->fd; - if (screen->force_enable_cl) - glsl_type_singleton_decref(); + glsl_type_singleton_decref(); if (screen->has_svm) os_munmap(screen->svm_cutout, screen->svm_cutout_size);