Remove EOpInternalFunctionCall
It's cleaner to mark internal functions by using the TName class,
similarly to TIntermSymbol.
TEST=angle_unittests
BUG=angleproject:1116
Change-Id: I12a03a3dea42b3fc571fa25a1b11d0161f24de72
Reviewed-on: https://chromium-review.googlesource.com/291621
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
diff --git a/src/compiler/translator/OutputHLSL.cpp b/src/compiler/translator/OutputHLSL.cpp
index b91a4a8..e03c39e 100644
--- a/src/compiler/translator/OutputHLSL.cpp
+++ b/src/compiler/translator/OutputHLSL.cpp
@@ -1939,7 +1939,9 @@
return false;
}
- out << TypeString(node->getType()) << " " << Decorate(TFunction::unmangleName(node->getName())) << (mOutputLod0Function ? "Lod0(" : "(");
+ TString name = DecorateFunctionIfNeeded(node->getNameObj());
+ out << TypeString(node->getType()) << " " << name
+ << (mOutputLod0Function ? "Lod0(" : "(");
TIntermSequence *arguments = node->getSequence();
@@ -1977,7 +1979,7 @@
case EOpFunction:
{
ASSERT(mCurrentFunctionMetadata == nullptr);
- TString name = TFunction::unmangleName(node->getName());
+ TString name = TFunction::unmangleName(node->getNameObj().getString());
size_t index = mCallDag.findIndex(node);
ASSERT(index != CallDAG::InvalidIndex);
@@ -1991,7 +1993,8 @@
}
else
{
- out << Decorate(name) << (mOutputLod0Function ? "Lod0(" : "(");
+ out << DecorateFunctionIfNeeded(node->getNameObj())
+ << (mOutputLod0Function ? "Lod0(" : "(");
}
TIntermSequence *sequence = node->getSequence();
@@ -2047,7 +2050,6 @@
break;
case EOpFunctionCall:
{
- TString name = TFunction::unmangleName(node->getName());
TIntermSequence *arguments = node->getSequence();
bool lod0 = mInsideDiscontinuousLoop || mOutputLod0Function;
@@ -2061,10 +2063,11 @@
ASSERT(index != CallDAG::InvalidIndex);
lod0 &= mASTMetadataList[index].mNeedsLod0;
- out << Decorate(name) << (lod0 ? "Lod0(" : "(");
+ out << DecorateFunctionIfNeeded(node->getNameObj()) << (lod0 ? "Lod0(" : "(");
}
else
{
+ TString name = TFunction::unmangleName(node->getNameObj().getString());
TBasicType samplerType = (*arguments)[0]->getAsTyped()->getType().getBasicType();
TextureFunction textureFunction;