Importing log2f fix for JB-MR1
Bug 28474248
Change-Id: Id5b93f3494c918cb344e5da7010dfa48a25cdde1
Reviewed-on: https://swiftshader-review.googlesource.com/5263
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
diff --git a/src/OpenGL/compiler/Intermediate.cpp b/src/OpenGL/compiler/Intermediate.cpp
index a8c06bf..ca0e59e 100644
--- a/src/OpenGL/compiler/Intermediate.cpp
+++ b/src/OpenGL/compiler/Intermediate.cpp
@@ -14,6 +14,7 @@
#include "localintermediate.h"
#include "SymbolTable.h"
+#include "Common/Math.hpp"
bool CompareStructure(const TType& leftNodeType, ConstantUnion* rightUnionArray, ConstantUnion* leftUnionArray);
@@ -1777,7 +1778,7 @@
break;
case EOpLog2:
switch(getType().getBasicType()) {
- case EbtFloat: tempConstArray[i].setFConst(log2f(unionArray[i].getFConst())); break;
+ case EbtFloat: tempConstArray[i].setFConst(sw::log2(unionArray[i].getFConst())); break;
default:
infoSink.info.message(EPrefixInternalError, "Unary operation not folded into constant", getLine());
return 0;