Merge pull request #629 from null77/fix-unicode

Change unicode dash to ASCII.
This commit is contained in:
John Kessenich 2016-12-14 15:15:41 -07:00 committed by GitHub
commit dca93d6baa

View File

@ -57,7 +57,7 @@ bool isNan(double x)
u.d = x; u.d = x;
int bitPatternL = u.i[0]; int bitPatternL = u.i[0];
int bitPatternH = u.i[1]; int bitPatternH = u.i[1];
return (bitPatternH & 0x7ff80000) == 0x7ff80000 && return (bitPatternH & 0x7ff80000) == 0x7ff80000 &&
((bitPatternH & 0xFFFFF) != 0 || bitPatternL != 0); ((bitPatternH & 0xFFFFF) != 0 || bitPatternL != 0);
} }
@ -68,7 +68,7 @@ bool isInf(double x)
u.d = x; u.d = x;
int bitPatternL = u.i[0]; int bitPatternL = u.i[0];
int bitPatternH = u.i[1]; int bitPatternH = u.i[1];
return (bitPatternH & 0x7ff00000) == 0x7ff00000 && return (bitPatternH & 0x7ff00000) == 0x7ff00000 &&
(bitPatternH & 0xFFFFF) == 0 && bitPatternL == 0; (bitPatternH & 0xFFFFF) == 0 && bitPatternL == 0;
} }
@ -131,7 +131,7 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TIntermTyped* right
TConstUnionArray smearedArray(newComps, rightNode->getConstArray()[0]); TConstUnionArray smearedArray(newComps, rightNode->getConstArray()[0]);
rightUnionArray = smearedArray; rightUnionArray = smearedArray;
} else if (constComps > 1 && newComps == 1) { } else if (constComps > 1 && newComps == 1) {
// for a case like vec4 f = 1.2 + vec4(2,3,4,5); // for a case like vec4 f = 1.2 + vec4(2,3,4,5);
newComps = constComps; newComps = constComps;
rightUnionArray = rightNode->getConstArray(); rightUnionArray = rightNode->getConstArray();
TConstUnionArray smearedArray(newComps, getConstArray()[0]); TConstUnionArray smearedArray(newComps, getConstArray()[0]);
@ -626,7 +626,7 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TType& returnType)
// //
// Do constant folding for an aggregate node that has all its children // Do constant folding for an aggregate node that has all its children
// as constants and an operator that requires constant folding. // as constants and an operator that requires constant folding.
// //
TIntermTyped* TIntermediate::fold(TIntermAggregate* aggrNode) TIntermTyped* TIntermediate::fold(TIntermAggregate* aggrNode)
{ {
if (! areAllChildConst(aggrNode)) if (! areAllChildConst(aggrNode))
@ -802,7 +802,7 @@ TIntermTyped* TIntermediate::fold(TIntermAggregate* aggrNode)
break; break;
case EOpSmoothStep: case EOpSmoothStep:
{ {
double t = (childConstUnions[2][arg2comp].getDConst() - childConstUnions[0][arg0comp].getDConst()) / double t = (childConstUnions[2][arg2comp].getDConst() - childConstUnions[0][arg0comp].getDConst()) /
(childConstUnions[1][arg1comp].getDConst() - childConstUnions[0][arg0comp].getDConst()); (childConstUnions[1][arg1comp].getDConst() - childConstUnions[0][arg0comp].getDConst());
if (t < 0.0) if (t < 0.0)
t = 0.0; t = 0.0;
@ -841,7 +841,7 @@ TIntermTyped* TIntermediate::fold(TIntermAggregate* aggrNode)
newConstArray[2] = childConstUnions[0][0] * childConstUnions[1][1] - childConstUnions[0][1] * childConstUnions[1][0]; newConstArray[2] = childConstUnions[0][0] * childConstUnions[1][1] - childConstUnions[0][1] * childConstUnions[1][0];
break; break;
case EOpFaceForward: case EOpFaceForward:
// If dot(Nref, I) < 0 return N, otherwise return N: Arguments are (N, I, Nref). // If dot(Nref, I) < 0 return N, otherwise return -N: Arguments are (N, I, Nref).
dot = childConstUnions[1].dot(childConstUnions[2]); dot = childConstUnions[1].dot(childConstUnions[2]);
for (int comp = 0; comp < numComps; ++comp) { for (int comp = 0; comp < numComps; ++comp) {
if (dot < 0.0) if (dot < 0.0)
@ -968,7 +968,7 @@ TIntermTyped* TIntermediate::foldDereference(TIntermTyped* node, int index, cons
} }
// //
// Make a constant vector node or constant scalar node, representing a given // Make a constant vector node or constant scalar node, representing a given
// constant vector and constant swizzle into it. // constant vector and constant swizzle into it.
// //
TIntermTyped* TIntermediate::foldSwizzle(TIntermTyped* node, TVectorFields& fields, const TSourceLoc& loc) TIntermTyped* TIntermediate::foldSwizzle(TIntermTyped* node, TVectorFields& fields, const TSourceLoc& loc)