Share a single TOperator enum among all constructor AST nodes
The code is a lot simpler when the type information is only carried
in the TType of the node, instead of being partially duplicated in the
enum value.
BUG=angleproject:1490
TEST=angle_unittests
Change-Id: I956376225ec01e469c7afb7378fa48cc097c0cea
Reviewed-on: https://chromium-review.googlesource.com/498768
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/compiler/translator/EmulatePrecision.cpp b/src/compiler/translator/EmulatePrecision.cpp
index 80d5c1e..4b08309 100644
--- a/src/compiler/translator/EmulatePrecision.cpp
+++ b/src/compiler/translator/EmulatePrecision.cpp
@@ -640,12 +640,16 @@
bool visitChildren = true;
switch (node->getOp())
{
- case EOpConstructStruct:
case EOpCallInternalRawFunction:
case EOpCallFunctionInAST:
// User-defined function return values are not rounded. The calculations that produced
// the value inside the function definition should have been rounded.
break;
+ case EOpConstruct:
+ if (node->getBasicType() == EbtStruct)
+ {
+ break;
+ }
default:
TIntermNode *parent = getParentNode();
if (canRoundFloat(node->getType()) && visit == PreVisit &&