Use ImmutableString in ImageFunctionHLSL
This code is analoguous to the code in TextureFunctionHLSL and is now
implemented in a similar manner.
BUG=angleproject:2267
TEST=angle_unittests, angle_end2end_tests
Change-Id: Ie3503766217dad4f3848f2d4b2fc3f62b3edce0c
Reviewed-on: https://chromium-review.googlesource.com/1110366
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
diff --git a/src/compiler/translator/OutputHLSL.cpp b/src/compiler/translator/OutputHLSL.cpp
index 121dd11..3245887 100644
--- a/src/compiler/translator/OutputHLSL.cpp
+++ b/src/compiler/translator/OutputHLSL.cpp
@@ -1941,8 +1941,8 @@
else if (node->getFunction()->isImageFunction())
{
const ImmutableString &name = node->getFunction()->name();
- TType type = (*arguments)[0]->getAsTyped()->getType();
- TString imageFunctionName = mImageFunctionHLSL->useImageFunction(
+ TType type = (*arguments)[0]->getAsTyped()->getType();
+ const ImmutableString &imageFunctionName = mImageFunctionHLSL->useImageFunction(
name, type.getBasicType(), type.getLayoutQualifier().imageInternalFormat,
type.getMemoryQualifier().readonly);
out << imageFunctionName << "(";