mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-20 05:10:11 +01:00
radeonsi: call ac_init_llvm_once before any util_queue initialization
The winsys uses util_queue, which calls atexit, so do it before the winsys
is created.
Cc: stable
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21041>
(cherry picked from commit 60a3f0667f)
This commit is contained in:
parent
b42fedba25
commit
04a27e4fca
2 changed files with 9 additions and 3 deletions
|
|
@ -52314,7 +52314,7 @@
|
||||||
"description": "radeonsi: call ac_init_llvm_once before any util_queue initialization",
|
"description": "radeonsi: call ac_init_llvm_once before any util_queue initialization",
|
||||||
"nominated": false,
|
"nominated": false,
|
||||||
"nomination_type": 3,
|
"nomination_type": 3,
|
||||||
"resolution": 4,
|
"resolution": 1,
|
||||||
"main_sha": null,
|
"main_sha": null,
|
||||||
"because_sha": null,
|
"because_sha": null,
|
||||||
"notes": null
|
"notes": null
|
||||||
|
|
|
||||||
|
|
@ -148,8 +148,6 @@ bool si_init_compiler(struct si_screen *sscreen, struct ac_llvm_compiler *compil
|
||||||
(sscreen->debug_flags & DBG(CHECK_IR) ? AC_TM_CHECK_IR : 0) |
|
(sscreen->debug_flags & DBG(CHECK_IR) ? AC_TM_CHECK_IR : 0) |
|
||||||
(create_low_opt_compiler ? AC_TM_CREATE_LOW_OPT : 0);
|
(create_low_opt_compiler ? AC_TM_CREATE_LOW_OPT : 0);
|
||||||
|
|
||||||
ac_init_llvm_once();
|
|
||||||
|
|
||||||
if (!ac_init_llvm_compiler(compiler, sscreen->info.family, tm_options))
|
if (!ac_init_llvm_compiler(compiler, sscreen->info.family, tm_options))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
@ -1495,6 +1493,14 @@ struct pipe_screen *radeonsi_screen_create(int fd, const struct pipe_screen_conf
|
||||||
if (!version)
|
if (!version)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
/* LLVM must be initialized before util_queue because both u_queue and LLVM call atexit,
|
||||||
|
* and LLVM must call it first because its atexit handler executes C++ destructors,
|
||||||
|
* which must be done after our compiler threads using LLVM in u_queue are finished
|
||||||
|
* by their atexit handler. Since atexit handlers are called in the reverse order,
|
||||||
|
* LLVM must be initialized first, followed by u_queue.
|
||||||
|
*/
|
||||||
|
ac_init_llvm_once();
|
||||||
|
|
||||||
driParseConfigFiles(config->options, config->options_info, 0, "radeonsi",
|
driParseConfigFiles(config->options, config->options_info, 0, "radeonsi",
|
||||||
NULL, NULL, NULL, 0, NULL, 0);
|
NULL, NULL, NULL, 0, NULL, 0);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue