summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/gallivm/instructionssoa.cpp
diff options
context:
space:
mode:
authorZack Rusin <zack@tungstengraphics.com>2008-05-16 16:06:59 -0400
committerZack Rusin <zack@tungstengraphics.com>2008-05-17 13:58:44 -0400
commit1d1cf8edf6a0409caf9aa7d44e186eb51f51fa1f (patch)
tree8a5aceaaedc73b62500fb0915e90bdb03ba55c4e /src/gallium/auxiliary/gallivm/instructionssoa.cpp
parentea1a607292ef31df70cda8c6476755e0224c9f7d (diff)
do the lit (some artifacts present)
Diffstat (limited to 'src/gallium/auxiliary/gallivm/instructionssoa.cpp')
-rw-r--r--src/gallium/auxiliary/gallivm/instructionssoa.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/gallivm/instructionssoa.cpp b/src/gallium/auxiliary/gallivm/instructionssoa.cpp
index 55fdda2791..074dd0ecd6 100644
--- a/src/gallium/auxiliary/gallivm/instructionssoa.cpp
+++ b/src/gallium/auxiliary/gallivm/instructionssoa.cpp
@@ -179,6 +179,7 @@ void InstructionsSoa::createFunctionMap()
m_functionsMap[TGSI_OPCODE_MIN] = "min";
m_functionsMap[TGSI_OPCODE_MAX] = "max";
m_functionsMap[TGSI_OPCODE_POWER] = "pow";
+ m_functionsMap[TGSI_OPCODE_LIT] = "lit";
}
void InstructionsSoa::createDependencies()
@@ -204,6 +205,14 @@ void InstructionsSoa::createDependencies()
minDeps[0] = "minvec";
m_builtinDependencies["min"] = minDeps;
}
+ {
+ std::vector<std::string> litDeps(4);
+ litDeps[0] = "minvec";
+ litDeps[1] = "maxvec";
+ litDeps[2] = "powf";
+ litDeps[3] = "powvec";
+ m_builtinDependencies["lit"] = litDeps;
+ }
}
llvm::Function * InstructionsSoa::function(int op)
@@ -475,3 +484,9 @@ std::vector<llvm::Value*> InstructionsSoa::sub(const std::vector<llvm::Value*> i
return res;
}
+std::vector<llvm::Value*> InstructionsSoa::lit(const std::vector<llvm::Value*> in)
+{
+ llvm::Function *func = function(TGSI_OPCODE_LIT);
+ return callBuiltin(func, in);
+}
+