From: Eric Anholt Date: Fri, 5 Aug 2011 23:18:00 +0000 (-0700) Subject: i965/vs: Fix constant vector construction. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=83d5850518388202c5589d3181b84fb54c213fb1;p=mesa.git i965/vs: Fix constant vector construction. Fixes some issues noticed in glsl-vs-all-01. --- diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp index 91abd40faad..8ee4884098c 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp @@ -1391,10 +1391,10 @@ vec4_visitor::visit(ir_constant *ir) return; } - for (int i = 0; i < ir->type->vector_elements; i++) { - this->result = src_reg(this, ir->type); - dst_reg dst = dst_reg(this->result); + this->result = src_reg(this, ir->type); + dst_reg dst = dst_reg(this->result); + for (int i = 0; i < ir->type->vector_elements; i++) { dst.writemask = 1 << i; switch (ir->type->base_type) {