Removed the precision check creating spurious error messages

TRAC #12641 The precision of compiler temporaries doesn't require checking, and would be hard to determine at parse time. We only require correct precisions for declarations, which is checked separately. So we can safely remove the check for binary operations. Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@342 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent c6f53400
...@@ -17,14 +17,8 @@ ...@@ -17,14 +17,8 @@
bool CompareStructure(const TType& leftNodeType, ConstantUnion* rightUnionArray, ConstantUnion* leftUnionArray); bool CompareStructure(const TType& leftNodeType, ConstantUnion* rightUnionArray, ConstantUnion* leftUnionArray);
TPrecision GetHighestPrecision( TPrecision left, TPrecision right, TInfoSink& infoSink ){ TPrecision GetHighestPrecision( TPrecision left, TPrecision right ){
TPrecision highest = left > right ? left : right; return left > right ? left : right;
if (highest == EbpUndefined) {
infoSink.info.message(EPrefixInternalError, "Unknown or invalid precision for operands", 0);
}
return highest;
} }
//////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////
// //
...@@ -788,7 +782,7 @@ bool TIntermBinary::promote(TInfoSink& infoSink) ...@@ -788,7 +782,7 @@ bool TIntermBinary::promote(TInfoSink& infoSink)
// //
setType(left->getType()); setType(left->getType());
TPrecision highestPrecision = GetHighestPrecision(left->getPrecision(), right->getPrecision(), infoSink); TPrecision highestPrecision = GetHighestPrecision(left->getPrecision(), right->getPrecision());
getTypePointer()->changePrecision(highestPrecision); getTypePointer()->changePrecision(highestPrecision);
// //
......
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