summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/gallivm/instructions.cpp
diff options
context:
space:
mode:
authorZack Rusin <zack@tungstengraphics.com>2008-04-21 00:10:39 -0400
committerZack Rusin <zack@tungstengraphics.com>2008-04-21 00:26:18 -0400
commit201ac414d4df00745e487a6ffbc9979a2e70f0c6 (patch)
tree3713e1c2c0389a0cf55ece047f55a2333b7036c0 /src/gallium/auxiliary/gallivm/instructions.cpp
parent40e0439db448a7d93ddb18faac7f14b47b1343c0 (diff)
make llvm draw paths compile with the latest changes
switch the method of distribution of builtins (to get rid of the llvm2cpp dependency)
Diffstat (limited to 'src/gallium/auxiliary/gallivm/instructions.cpp')
-rw-r--r--src/gallium/auxiliary/gallivm/instructions.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/gallium/auxiliary/gallivm/instructions.cpp b/src/gallium/auxiliary/gallivm/instructions.cpp
index 8919491792..b35d6790f7 100644
--- a/src/gallium/auxiliary/gallivm/instructions.cpp
+++ b/src/gallium/auxiliary/gallivm/instructions.cpp
@@ -35,6 +35,8 @@
#include "storage.h"
+#include "pipe/p_util.h"
+
#include <llvm/CallingConv.h>
#include <llvm/Constants.h>
#include <llvm/DerivedTypes.h>
@@ -42,7 +44,8 @@
#include <llvm/InstrTypes.h>
#include <llvm/Instructions.h>
#include <llvm/ParameterAttributes.h>
-#include <llvm/ParamAttrsList.h>
+#include <llvm/Support/MemoryBuffer.h>
+#include <llvm/Bitcode/ReaderWriter.h>
#include <sstream>
#include <fstream>
@@ -53,7 +56,6 @@ using namespace llvm;
#include "gallivm_builtins.cpp"
#if 0
-
llvm::Value *arrayFromChannels(std::vector<llvm::Value*> &vals)
{
VectorType *vectorType = VectorType::get(Type::FloatTy, 4);
@@ -84,7 +86,10 @@ Instructions::Instructions(llvm::Module *mod, llvm::Function *func, llvm::BasicB
m_llvmLit = 0;
m_fmtPtr = 0;
- createGallivmBuiltins(m_mod);
+ MemoryBuffer *buffer = MemoryBuffer::getMemBuffer(
+ (const char*)&llvm_builtins_data[0],
+ (const char*)&llvm_builtins_data[Elements(llvm_builtins_data)-1]);
+ m_mod = ParseBitcodeFile(buffer);
}
llvm::Value * Instructions::add(llvm::Value *in1, llvm::Value *in2)