In _mesa_lookup_parameter_constant() make sure we return a full, 4-component swizzle.
diff --git a/src/mesa/shader/prog_parameter.c b/src/mesa/shader/prog_parameter.c
index adffafd..2c8a340 100644
--- a/src/mesa/shader/prog_parameter.c
+++ b/src/mesa/shader/prog_parameter.c
@@ -532,6 +532,10 @@
                       }
                    }
                 }
+                /* smear last value to remaining positions */
+                for (; j < 4; j++)
+                   swz[j] = swz[j-1];
+
                 if (match == vSize) {
                    *posOut = i;
                    *swizzleOut = MAKE_SWIZZLE4(swz[0], swz[1], swz[2], swz[3]);