Store un-linked shader attributes in ProgramBinary.

Our caching of compiled vertex shaders according to their input
signature needs a consistent input signature to match up shaders.
Since the linking step currently shuffles attributes according
to API specified locations we need a separate list.

BUG=angle:560
Change-Id: Icc4d5df1d37ae895d5c882b86e60f05b5c268461
Reviewed-on: https://chromium-review.googlesource.com/185193
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libGLESv2/ProgramBinary.cpp b/src/libGLESv2/ProgramBinary.cpp
index a5d6a46..c5fd884 100644
--- a/src/libGLESv2/ProgramBinary.cpp
+++ b/src/libGLESv2/ProgramBinary.cpp
@@ -1039,6 +1039,8 @@
         std::string name;
         stream.read(&name);
         mLinkedAttribute[i].name = name;
+        stream.read(&mShaderAttributes[i].type);
+        stream.read(&mShaderAttributes[i].name);
         stream.read(&mSemanticIndex[i]);
     }
 
@@ -1258,6 +1260,8 @@
     {
         stream.write(mLinkedAttribute[i].type);
         stream.write(mLinkedAttribute[i].name);
+        stream.write(mShaderAttributes[i].type);
+        stream.write(mShaderAttributes[i].name);
         stream.write(mSemanticIndex[i]);
     }
 
@@ -1529,6 +1533,8 @@
         const sh::Attribute &attribute = activeAttributes[attributeIndex];
         const int location = attribute.location == -1 ? attributeBindings.getAttributeBinding(attribute.name) : attribute.location;
 
+        mShaderAttributes[attributeIndex] = attribute;
+
         if (location != -1)   // Set by glBindAttribLocation or by location layout qualifier
         {
             const int rows = AttributeRegisterCount(attribute.type);