* Add a new unnamed constant to the parameter list. This will be used
* when a fragment/vertex program contains something like this:
* MOV r, { 0, 1, 2, 3 };
- * We'll search the parameter list for an existing instance of the
- * constant. If swizzleOut is non-null, we'll try swizzling when
- * looking for a match.
+ * If swizzleOut is non-null we'll search the parameter list for an
+ * existing instance of the constant which matches with a swizzle.
*
* \param paramList the parameter list
* \param values four float values
ASSERT(size >= 1);
ASSERT(size <= 4);
- if (_mesa_lookup_parameter_constant(paramList, values,
+ if (swizzleOut &&
+ _mesa_lookup_parameter_constant(paramList, values,
size, &pos, swizzleOut)) {
return pos;
}