aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_misc.cpp11
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_misc.h5
2 files changed, 16 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
index 5fe697346fe..347381f9b32 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
+++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
@@ -836,3 +836,14 @@ LLVMValueRef LLVMBuildAtomicCmpXchg(LLVMBuilderRef B, LLVMValueRef Ptr,
SingleThread ? llvm::SynchronizationScope::SingleThread : llvm::SynchronizationScope::CrossThread));
}
#endif
+
+#if HAVE_LLVM < 0x305
+LLVMValueRef LLVMBuildFence(LLVMBuilderRef B,
+ LLVMAtomicOrdering ordering,
+ LLVMBool singleThread,
+ const char *Name)
+{
+ return llvm::wrap(llvm::unwrap(B)->CreateFence(mapFromLLVMOrdering(ordering),
+ singleThread ? llvm::SynchronizationScope::SingleThread : llvm::SynchronizationScope::CrossThread));
+}
+#endif
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.h b/src/gallium/auxiliary/gallivm/lp_bld_misc.h
index 629751502e7..67c2cfd3fc4 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_misc.h
+++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.h
@@ -85,6 +85,11 @@ LLVMValueRef LLVMBuildAtomicCmpXchg(LLVMBuilderRef B, LLVMValueRef Ptr,
LLVMBool SingleThread);
#endif
+#if HAVE_LLVM < 0x305
+LLVMValueRef LLVMBuildFence(LLVMBuilderRef B,
+ LLVMAtomicOrdering ordering,
+ LLVMBool singleThread, const char *Name);
+#endif
#ifdef __cplusplus
}
#endif