From 83d5850518388202c5589d3181b84fb54c213fb1 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 5 Aug 2011 16:18:00 -0700 Subject: [PATCH] i965/vs: Fix constant vector construction. Fixes some issues noticed in glsl-vs-all-01. --- src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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) { -- 2.30.2