From: Eric Anholt Date: Fri, 5 Aug 2011 23:37:18 +0000 (-0700) Subject: i965/vs: Fix ir_swizzle handling. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bb468fc1ede9b0a5231ebfaa51df444502d33654;p=mesa.git i965/vs: Fix ir_swizzle handling. I decided to refactor it a bit in adapting ir_to_mesa.cpp code, and mangled it. Fixes glsl-vs-cross-2. --- diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp index 3e62c9ebba8..4f2a2011068 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp @@ -1109,7 +1109,7 @@ vec4_visitor::visit(ir_swizzle *ir) src = this->result; assert(src.file != BAD_FILE); - if (i < ir->type->vector_elements) { + for (i = 0; i < ir->type->vector_elements; i++) { switch (i) { case 0: swizzle[i] = BRW_GET_SWZ(src.swizzle, ir->mask.x);