summaryrefslogtreecommitdiffstats
path: root/src/mesa/pipe/llvm/storagesoa.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/pipe/llvm/storagesoa.h')
-rw-r--r--src/mesa/pipe/llvm/storagesoa.h21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/mesa/pipe/llvm/storagesoa.h b/src/mesa/pipe/llvm/storagesoa.h
index 2d07e836f4b..9443234c82f 100644
--- a/src/mesa/pipe/llvm/storagesoa.h
+++ b/src/mesa/pipe/llvm/storagesoa.h
@@ -44,22 +44,26 @@ namespace llvm {
class StorageSoa
{
public:
+ enum Argument {
+ Input,
+ Output,
+ Temp,
+ Const,
+ Immediate
+ };
+public:
StorageSoa(llvm::BasicBlock *block,
llvm::Value *input,
llvm::Value *output,
llvm::Value *consts,
llvm::Value *temps);
+ std::vector<llvm::Value*> argument(Argument type, int idx, int swizzle,
+ llvm::Value *indIdx =0);
void addImmediate(float *vec);
llvm::Value * addrElement(int idx) const;
- std::vector<llvm::Value*> inputElement(int idx, int swizzle, llvm::Value *indIdx =0);
- std::vector<llvm::Value*> constElement(int idx, int swizzle, llvm::Value *indIdx =0);
- std::vector<llvm::Value*> outputElement(int idx, int swizzle, llvm::Value *indIdx =0);
- std::vector<llvm::Value*> tempElement(int idx, int swizzle, llvm::Value *indIdx =0);
- std::vector<llvm::Value*> immediateElement(int idx, int swizzle);
-
llvm::Value *extractIndex(llvm::Value *vec);
void storeOutput(int dstIdx, const std::vector<llvm::Value*> &val,
@@ -79,6 +83,11 @@ private:
llvm::Module *currentModule() const;
llvm::Value *createConstGlobalVector(float *vec);
+ std::vector<llvm::Value*> inputElement(int idx, llvm::Value *indIdx =0);
+ std::vector<llvm::Value*> constElement(int idx, llvm::Value *indIdx =0);
+ std::vector<llvm::Value*> outputElement(int idx, llvm::Value *indIdx =0);
+ std::vector<llvm::Value*> tempElement(int idx, llvm::Value *indIdx =0);
+ std::vector<llvm::Value*> immediateElement(int idx);
private:
llvm::BasicBlock *m_block;