Replace EvqInternal with a separate flag to make it more flexible
The internal flag disables decorating a given symbol in output, effectively
placing it to a different namespace than user-defined symbols. This enables the
compiler to insert symbols to the tree when transforming it to be suitable for
HLSL output without running into name conflicts. In this patch the flag is
separated from the qualifiers since sometimes different qualifiers need to be
used with these internal symbols.
TEST=angle_unittests, angle_end2end_tests, WebGL conformance tests
BUG=angleproject:941
Change-Id: I7036bed98fdb1478a383bb959ca03b42c3cb8100
Reviewed-on: https://chromium-review.googlesource.com/266690
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
diff --git a/src/compiler/translator/RewriteElseBlocks.cpp b/src/compiler/translator/RewriteElseBlocks.cpp
index b03beb5..4631b5d 100644
--- a/src/compiler/translator/RewriteElseBlocks.cpp
+++ b/src/compiler/translator/RewriteElseBlocks.cpp
@@ -34,8 +34,10 @@
TIntermSymbol *MakeNewTemporary(const TString &name, TBasicType type)
{
- TType variableType(type, EbpHigh, EvqInternal);
- return new TIntermSymbol(-1, name, variableType);
+ TType variableType(type, EbpHigh, EvqTemporary);
+ TIntermSymbol *node = new TIntermSymbol(-1, name, variableType);
+ node->setInternal(true);
+ return node;
}
TIntermBinary *MakeNewBinary(TOperator op, TIntermTyped *left, TIntermTyped *right, const TType &resultType)