Use GetOperatorString when writing GLSL unary built-in calls
GetOperatorString is now used when writing GLSL for built-in calls
that fall under TIntermUnary. Component-wise not TOperator enum is
renamed for consistency.
This also cleans up some unnecessary creation of string objects when
writing built-in functions.
BUG=angleproject:1682
TEST=angle_unittests, angle_end2end_tests, WebGL conformance tests
Change-Id: I89b2ef222bf5af479d4977417f320789b58ace85
Reviewed-on: https://chromium-review.googlesource.com/424552
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/compiler/translator/OutputHLSL.h b/src/compiler/translator/OutputHLSL.h
index cd4c64b..0c7d482 100644
--- a/src/compiler/translator/OutputHLSL.h
+++ b/src/compiler/translator/OutputHLSL.h
@@ -109,7 +109,7 @@
void outputEqual(Visit visit, const TType &type, TOperator op, TInfoSinkBase &out);
- void writeEmulatedFunctionTriplet(TInfoSinkBase &out, Visit visit, const char *preStr);
+ void writeEmulatedFunctionTriplet(TInfoSinkBase &out, Visit visit, TOperator op);
void makeFlaggedStructMaps(const std::vector<TIntermTyped *> &flaggedStructs);
// Returns true if it found a 'same symbol' initializer (initializer that references the
@@ -122,7 +122,6 @@
TIntermSymbol *symbolNode,
TIntermTyped *expression);
- void writeDeferredGlobalInitializers(TInfoSinkBase &out);
void writeIfElse(TInfoSinkBase &out, TIntermIfElse *node);
// Returns the function name