Fix the swizzling of vector constructors from scalars.
authorEric Anholt <eric@anholt.net>
Fri, 23 Apr 2010 01:48:20 +0000 (18:48 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Fri, 23 Apr 2010 23:12:44 +0000 (16:12 -0700)
A refactor turned 'i' into '1', meaning everything writemasked into
the y component.

glsl_types.cpp

index 4cd0f46aab217187b59468e955ff74be943911a2..b4abfdd7b684078c1c161c9b160fe88334809553 100644 (file)
@@ -259,7 +259,7 @@ generate_vec_body_from_N_scalars(exec_list *instructions,
       ir_dereference *const lhs_ref = new ir_dereference(declarations[16]);
       ir_dereference *const rhs = new ir_dereference(declarations[i]);
 
-      ir_swizzle *lhs = new ir_swizzle(lhs_ref, 1, 0, 0, 0, 1);
+      ir_swizzle *lhs = new ir_swizzle(lhs_ref, i, 0, 0, 0, 1);
 
       inst = new ir_assignment(lhs, rhs, NULL);
       instructions->push_tail(inst);