diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 15 | ||||
-rw-r--r-- | src/gallium/drivers/radeon/radeon_llvm_emit.cpp | 14 |
2 files changed, 15 insertions, 14 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp index a531d98e881..897f7ffb276 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp +++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp @@ -79,6 +79,21 @@ #include "lp_bld_misc.h" +namespace { + +class LLVMEnsureMultithreaded { +public: + LLVMEnsureMultithreaded() + { + if (!LLVMIsMultithreaded()) { + LLVMStartMultithreaded(); + } + } +}; + +static LLVMEnsureMultithreaded lLVMEnsureMultithreaded; + +} extern "C" void lp_set_target_options(void) diff --git a/src/gallium/drivers/radeon/radeon_llvm_emit.cpp b/src/gallium/drivers/radeon/radeon_llvm_emit.cpp index fb974f91ac2..10127151b10 100644 --- a/src/gallium/drivers/radeon/radeon_llvm_emit.cpp +++ b/src/gallium/drivers/radeon/radeon_llvm_emit.cpp @@ -58,20 +58,6 @@ using namespace llvm; -namespace { - -class LLVMEnsureMultithreaded { -public: - LLVMEnsureMultithreaded() - { - llvm_start_multithreaded(); - } -}; - -static LLVMEnsureMultithreaded lLVMEnsureMultithreaded; - -} - /** * Set the shader type we want to compile * |