summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/gallivm/instructionssoa.cpp
diff options
context:
space:
mode:
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 55fdda27916..074dd0ecd6b 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);
+}
+