Store TVariable* in TIntermSymbol instead of storing id
This is an intermediate step to only storing a TVariable * in
TIntermSymbol instead of copying the name.
This makes it possible to get a constant value out of a TIntermSymbol
without doing a symbol table lookup.
BUG=angleproject:2267
TEST=angle_unittests
Change-Id: Ibff588241a4ad4ac330063296273288b20a072c9
Reviewed-on: https://chromium-review.googlesource.com/829142
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/compiler/translator/OutputHLSL.cpp b/src/compiler/translator/OutputHLSL.cpp
index 739f686..65270ff 100644
--- a/src/compiler/translator/OutputHLSL.cpp
+++ b/src/compiler/translator/OutputHLSL.cpp
@@ -2408,7 +2408,7 @@
{
TIntermBinary *test = node->getCondition()->getAsBinaryNode();
- if (test && test->getLeft()->getAsSymbolNode()->getId() == index->getId())
+ if (test && test->getLeft()->getAsSymbolNode()->uniqueId() == index->uniqueId())
{
TIntermConstantUnion *constant = test->getRight()->getAsConstantUnion();