Commit 2ce222c5 by Alexis Hetu Committed by Alexis Hétu

Importing log2f fix for JB-MR1

Bug 28474248 Change-Id: Id5b93f3494c918cb344e5da7010dfa48a25cdde1 Reviewed-on: https://swiftshader-review.googlesource.com/5263Tested-by: 's avatarAlexis Hétu <sugoi@google.com> Reviewed-by: 's avatarNicolas Capens <capn@google.com>
parent f91d9c1c
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include "localintermediate.h" #include "localintermediate.h"
#include "SymbolTable.h" #include "SymbolTable.h"
#include "Common/Math.hpp"
bool CompareStructure(const TType& leftNodeType, ConstantUnion* rightUnionArray, ConstantUnion* leftUnionArray); bool CompareStructure(const TType& leftNodeType, ConstantUnion* rightUnionArray, ConstantUnion* leftUnionArray);
...@@ -1777,7 +1778,7 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, TIntermTyped* constantNod ...@@ -1777,7 +1778,7 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, TIntermTyped* constantNod
break; break;
case EOpLog2: case EOpLog2:
switch(getType().getBasicType()) { 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: default:
infoSink.info.message(EPrefixInternalError, "Unary operation not folded into constant", getLine()); infoSink.info.message(EPrefixInternalError, "Unary operation not folded into constant", getLine());
return 0; return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment