glsl: Set proper swizzle when a channel is missing in vectorizing.
authorMatt Turner <mattst88@gmail.com>
Fri, 24 Jan 2014 23:17:08 +0000 (15:17 -0800)
committerMatt Turner <mattst88@gmail.com>
Tue, 28 Jan 2014 05:15:35 +0000 (21:15 -0800)
commit8e2b8bd0e613d1e24860d9572fc16893ad11a2da
tree7cd23a5d48b696c1d5ac1c23e5f8bfd2f75b91d9
parent57109d57f8c7425f4c6f865f1697a864da27aabd
glsl: Set proper swizzle when a channel is missing in vectorizing.

Previously, for example if the x channel was missing from a series of
assignments we were attempting to vectorize, the wrong swizzle mask
would be applied.

   a.y = b.y;
   a.z = b.z;
   a.w = b.w;

would be incorrectly transformed into

   a.yzw = b.xyz;

Fixes two transform feedback tests in the ES3 conformance suite.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73978
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73954
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/glsl/opt_vectorize.cpp