Allow OutputGLSL to write non-square matrices.

Fixes assertion failures when ShaderGL fails to compile the generated shaders.

BUG=angleproject:882
BUG=angleproject:1149

Change-Id: Ib7c23a54bdb81852864d792f29c89644084859a3
Reviewed-on: https://chromium-review.googlesource.com/297085
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
diff --git a/src/compiler/translator/OutputGLSLBase.cpp b/src/compiler/translator/OutputGLSLBase.cpp
index 3c98b56..63b2813 100644
--- a/src/compiler/translator/OutputGLSLBase.cpp
+++ b/src/compiler/translator/OutputGLSLBase.cpp
@@ -1190,6 +1190,10 @@
     {
         out << "mat";
         out << type.getNominalSize();
+        if (type.getSecondarySize() != type.getNominalSize())
+        {
+            out << "x" << type.getSecondarySize();
+        }
     }
     else if (type.isVector())
     {