Do not hash mapping field names of a reserved struct.
With this fixed, Chrome behaves the same on WebGL conformance tests 1.0.2 with/without --enable-shader-name-hashing
BUG=
TEST=WebGL conformance tests
Review URL: https://codereview.appspot.com/7229043
git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1817 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/compiler/OutputGLSLBase.cpp b/src/compiler/OutputGLSLBase.cpp
index 45fabed..1b9a10d 100644
--- a/src/compiler/OutputGLSLBase.cpp
+++ b/src/compiler/OutputGLSLBase.cpp
@@ -262,7 +262,13 @@
{
out << ".";
// TODO(alokp): ASSERT
- out << hashName(node->getType().getFieldName());
+ TString fieldName = node->getType().getFieldName();
+
+ const TType& structType = node->getLeft()->getType();
+ if (!mSymbolTable.findBuiltIn(structType.getTypeName()))
+ fieldName = hashName(fieldName);
+
+ out << fieldName;
visitChildren = false;
}
break;