summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorTom Stellard <[email protected]>2015-09-24 16:29:56 +0000
committerEmil Velikov <[email protected]>2015-10-07 14:50:23 +0100
commit00425de65779ad3a61639287088ea5eaaf567cb6 (patch)
tree40b4becd6254572efc645569d303de66f46c541e /src/gallium
parent16d9e621073ae9d2fbd454708cdb3e7eb32d6f55 (diff)
radeon/llvm: Initialize gallivm targets when initializing the AMDGPU target v2
This fixes a race condition in the glx-multithreaded-shader-compile test. v2: - Replace gallivm_init_llvm_{begin,end}() with gallivm_init_llvm_targets(). Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Mathias Fröhlich <[email protected]> Reviewed-by: Emil Velikov <[email protected]> CC: "10.6 11.0" <[email protected]> (cherry picked from commit a2e1e3d325a70604151ef093ed741e60d078a21a)
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/radeon/radeon_llvm_emit.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeon/radeon_llvm_emit.c b/src/gallium/drivers/radeon/radeon_llvm_emit.c
index 5d93a4dd7b4..1a66a55ee03 100644
--- a/src/gallium/drivers/radeon/radeon_llvm_emit.c
+++ b/src/gallium/drivers/radeon/radeon_llvm_emit.c
@@ -26,6 +26,7 @@
#include "radeon_llvm_emit.h"
#include "radeon_elf_util.h"
#include "c11/threads.h"
+#include "gallivm/lp_bld_misc.h"
#include "util/u_memory.h"
#include "pipe/p_shader_tokens.h"
@@ -87,6 +88,7 @@ void radeon_llvm_shader_type(LLVMValueRef F, unsigned type)
static void init_r600_target()
{
+ gallivm_init_llvm_targets();
#if HAVE_LLVM < 0x0307
LLVMInitializeR600TargetInfo();
LLVMInitializeR600Target();