Add a secondary size field to the shader language types, to account for matrix rows. Also add some extra logic
to the promote method to check that the sizes of the arguments to multiplications are properly formed.

We require this extra information for non-square matrix support.

TRAC #23081

Signed-off-by: Geoff Lang
Signed-off-by: Nicolas Capens
Author: Jamie Madill

git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2392 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/compiler/parseConst.cpp b/src/compiler/parseConst.cpp
index 421d31f..d7b3498 100644
--- a/src/compiler/parseConst.cpp
+++ b/src/compiler/parseConst.cpp
@@ -119,7 +119,7 @@
 
         if (node->getType().isMatrix()) {
             isMatrix = true;
-            matrixSize = node->getType().getNominalSize();
+            matrixSize = node->getType().getRows();
         }
     }       
 
@@ -165,10 +165,10 @@
         return;
 
     if (!singleConstantParam) {
-        int size = node->getType().getObjectSize();
+        int objectSize = node->getType().getObjectSize();
     
         ConstantUnion *rightUnionArray = node->getUnionArrayPointer();
-        for (int i=0; i < size; i++) {
+        for (int i=0; i < objectSize; i++) {
             if (index >= instanceSize)
                 return;
             leftUnionArray[index] = rightUnionArray[i];