ac/llvm: export ac_init_llvm_once in targets
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Thu, 25 Jun 2020 13:14:01 +0000 (15:14 +0200)
committerPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Fri, 10 Jul 2020 09:57:11 +0000 (11:57 +0200)
commit50d20dc055decf43f956601d71572f825c2b2eca
treeb90df61f9f73e12f6991ee9a09f6bf251bf74407
parent8da237428c19ff185d8be7c2909a2d74874b646b
ac/llvm: export ac_init_llvm_once in targets

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 <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5648>
src/amd/llvm/ac_llvm_util.c
src/amd/vulkan/meson.build
src/gallium/targets/dri-vdpau.dyn
src/gallium/targets/dri/dri.sym
src/gallium/targets/omx/omx.sym
src/gallium/targets/pipe-loader/pipe.sym
src/gallium/targets/va/va.sym
src/gallium/targets/vdpau/vdpau.sym