From 50d20dc055decf43f956601d71572f825c2b2eca Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Thu, 25 Jun 2020 15:14:01 +0200 Subject: ac/llvm: export ac_init_llvm_once in targets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If a program like mpv uses both radeon_dri.so (because --vo=gpu) and radeonsi_drv_video.so (because --hwdec=vaapi) then LLVM will be inialized twice. The commit exports the ac_init_llvm_once so there's only one instance of the function. See also 18b12bf5335 ("targets: export radeon winsys_create functions to silence LLVM warning") which implemented this workaround initially. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/1377 Reviewed-by: Marek Olšák Acked-by: Samuel Pitoiset Part-of: --- src/gallium/targets/dri-vdpau.dyn | 1 + src/gallium/targets/dri/dri.sym | 1 + src/gallium/targets/omx/omx.sym | 1 + src/gallium/targets/pipe-loader/pipe.sym | 1 + src/gallium/targets/va/va.sym | 1 + src/gallium/targets/vdpau/vdpau.sym | 1 + 6 files changed, 6 insertions(+) (limited to 'src/gallium/targets') diff --git a/src/gallium/targets/dri-vdpau.dyn b/src/gallium/targets/dri-vdpau.dyn index a7919f7d3ba..d37123a8659 100644 --- a/src/gallium/targets/dri-vdpau.dyn +++ b/src/gallium/targets/dri-vdpau.dyn @@ -2,4 +2,5 @@ nouveau_drm_screen_create; radeon_drm_winsys_create; amdgpu_winsys_create; + ac_init_llvm_once; }; diff --git a/src/gallium/targets/dri/dri.sym b/src/gallium/targets/dri/dri.sym index 1fdf18beee7..83914c60cf3 100644 --- a/src/gallium/targets/dri/dri.sym +++ b/src/gallium/targets/dri/dri.sym @@ -6,6 +6,7 @@ radeon_drm_winsys_create; amdgpu_winsys_create; fd_drm_screen_create; + ac_init_llvm_once; local: *; }; diff --git a/src/gallium/targets/omx/omx.sym b/src/gallium/targets/omx/omx.sym index 07b65e57643..1cca4645bbb 100644 --- a/src/gallium/targets/omx/omx.sym +++ b/src/gallium/targets/omx/omx.sym @@ -7,6 +7,7 @@ # due to LLVM being initialized multiple times. radeon_drm_winsys_create; amdgpu_winsys_create; + ac_init_llvm_once; local: *; }; diff --git a/src/gallium/targets/pipe-loader/pipe.sym b/src/gallium/targets/pipe-loader/pipe.sym index 605cb83d802..8054e11ae18 100644 --- a/src/gallium/targets/pipe-loader/pipe.sym +++ b/src/gallium/targets/pipe-loader/pipe.sym @@ -7,6 +7,7 @@ # due to LLVM being initialized multiple times. radeon_drm_winsys_create; amdgpu_winsys_create; + ac_init_llvm_once; local: *; }; diff --git a/src/gallium/targets/va/va.sym b/src/gallium/targets/va/va.sym index 917c3d3c301..3f48ab61e98 100644 --- a/src/gallium/targets/va/va.sym +++ b/src/gallium/targets/va/va.sym @@ -6,6 +6,7 @@ # due to LLVM being initialized multiple times. radeon_drm_winsys_create; amdgpu_winsys_create; + ac_init_llvm_once; local: *; }; diff --git a/src/gallium/targets/vdpau/vdpau.sym b/src/gallium/targets/vdpau/vdpau.sym index 5e71c6285a6..36935e9e14d 100644 --- a/src/gallium/targets/vdpau/vdpau.sym +++ b/src/gallium/targets/vdpau/vdpau.sym @@ -4,6 +4,7 @@ nouveau_drm_screen_create; radeon_drm_winsys_create; amdgpu_winsys_create; + ac_init_llvm_once; local: *; }; -- cgit v1.2.3