summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2011-08-05 16:37:18 -0700
committerEric Anholt <[email protected]>2011-08-16 13:04:41 -0700
commitbb468fc1ede9b0a5231ebfaa51df444502d33654 (patch)
tree77e2b6653a6fe6ada80ce4a54b050dda6459c441
parent78fac1892a3a7a90eb7baf78903d70649028d27a (diff)
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.
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp2
1 files changed, 1 insertions, 1 deletions
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);