Fix code generation for vec.swiz *= mat

Khronos test CL: https://gerrit.khronos.org/#/c/2944/
Bug: b/116259485

Change-Id: Ie10b3eb16da39f332966a5b957acb0232140a942
Reviewed-on: https://swiftshader-review.googlesource.com/20748
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Tested-by: Chris Forbes <chrisforbes@google.com>
diff --git a/src/OpenGL/compiler/OutputASM.cpp b/src/OpenGL/compiler/OutputASM.cpp
index c18ecf7..3fe64fa 100644
--- a/src/OpenGL/compiler/OutputASM.cpp
+++ b/src/OpenGL/compiler/OutputASM.cpp
@@ -748,6 +748,11 @@
 		case EOpVectorTimesMatrixAssign:
 			assert(visit == PreVisit);
 			{
+				// The left operand may contain a swizzle serving double-duty as
+				// swizzle and writemask, so it's important that we traverse it
+				// first. Otherwise we may end up never setting up our left
+				// operand correctly.
+				left->traverse(this);
 				right->traverse(this);
 				int size = leftType.getNominalSize();