diff options
author | Stephane Marchesin <[email protected]> | 2008-10-07 21:11:01 +0200 |
---|---|---|
committer | Stephane Marchesin <[email protected]> | 2008-10-07 21:11:01 +0200 |
commit | 94ba48bd85ec5c62e1a303d8bb3fc25c8e153247 (patch) | |
tree | 5c46163fb530fb6d87ef13f6e66f3d2d7c4e202c /src/gallium/auxiliary/gallivm/storagesoa.h | |
parent | 8e8208d6db8b764568539784a6473d545dec2265 (diff) |
Gallivm: fix the constant layout, this gets a bunch of progs/ working. Notably, gears doesn't.
Diffstat (limited to 'src/gallium/auxiliary/gallivm/storagesoa.h')
-rw-r--r-- | src/gallium/auxiliary/gallivm/storagesoa.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/gallivm/storagesoa.h b/src/gallium/auxiliary/gallivm/storagesoa.h index ae2fc7c6aee..f21ca6ec433 100644 --- a/src/gallium/auxiliary/gallivm/storagesoa.h +++ b/src/gallium/auxiliary/gallivm/storagesoa.h @@ -29,6 +29,7 @@ #define STORAGESOA_H #include <pipe/p_shader_tokens.h> +#include <llvm/Support/IRBuilder.h> #include <vector> #include <list> @@ -56,7 +57,7 @@ public: std::vector<llvm::Value*> load(enum tgsi_file_type type, int idx, int swizzle, - llvm::Value *indIdx =0); + llvm::IRBuilder<>* m_builder, llvm::Value *indIdx =0); void store(enum tgsi_file_type type, int idx, const std::vector<llvm::Value*> &val, int mask); @@ -76,10 +77,12 @@ private: const char *name(const char *prefix) const; llvm::Value *alignedArrayLoad(llvm::Value *val); llvm::Module *currentModule() const; + llvm::Constant *createConstGlobalFloat(const float val); llvm::Constant *createConstGlobalVector(const std::vector<float> &vec); std::vector<llvm::Value*> inputElement(llvm::Value *indIdx); - std::vector<llvm::Value*> constElement(llvm::Value *indIdx); + llvm::Value* unpackConstElement(llvm::IRBuilder<>* m_builder, llvm::Value *indIdx, int cc); + std::vector<llvm::Value*> constElement(llvm::IRBuilder<>* m_builder, llvm::Value *indIdx); std::vector<llvm::Value*> outputElement(llvm::Value *indIdx); std::vector<llvm::Value*> tempElement(llvm::Value *indIdx); std::vector<llvm::Value*> immediateElement(llvm::Value *indIdx); |