If someone happened to land a set in a different swizzle order, we
would have assertion failed.
GLfloat values[4];
GLuint idx;
GLuint swizzle;
+ struct prog_src_register reg;
values[0] = s0;
values[1] = s1;
values[3] = s3;
idx = _mesa_add_unnamed_constant( paramList, values, 4, &swizzle );
- assert(swizzle == SWIZZLE_NOOP); /* Need to handle swizzle in reg setup */
- return src_reg(PROGRAM_STATE_VAR, idx);
+ reg = src_reg(PROGRAM_STATE_VAR, idx);
+ reg.Swizzle = swizzle;
+
+ return reg;
}