Perform update_precision on constructors and converts

Fixes #2740
This commit is contained in:
Greg Fischer 2021-09-02 10:49:46 -06:00
parent 2fb89a0072
commit 8ef6a4cb4d
24 changed files with 120 additions and 73 deletions

View file

@ -7691,7 +7691,13 @@ TIntermTyped* TParseContext::addConstructor(const TSourceLoc& loc, TIntermNode*
return nullptr;
}
return intermediate.setAggregateOperator(aggrNode, op, type, loc);
TIntermTyped *ret_node = intermediate.setAggregateOperator(aggrNode, op, type, loc);
TIntermAggregate *agg_node = ret_node->getAsAggregate();
if (agg_node && agg_node->isVector())
agg_node->updatePrecision();
return ret_node;
}
// Function for constructor implementation. Calls addUnaryMath with appropriate EOp value