From 4006424f5b5b3b189209faf03f2335f45c22b148 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 3 Jun 2010 10:13:18 -0700 Subject: [PATCH] ir_to_mesa: Don't allocate temps for swizzles. We do them in place by actually, you know, swizzling. --- ir_to_mesa.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ir_to_mesa.cpp b/ir_to_mesa.cpp index 56815ac..53b7337 100644 --- a/ir_to_mesa.cpp +++ b/ir_to_mesa.cpp @@ -669,9 +669,8 @@ ir_to_mesa_visitor::visit(ir_swizzle *ir) */ ir->val->accept(this); - assert(this->result.file != PROGRAM_UNDEFINED); - - src_reg = this->get_temp(4); + src_reg = this->result; + assert(src_reg.file != PROGRAM_UNDEFINED); for (i = 0; i < 4; i++) { if (i < ir->type->vector_elements) { -- 2.7.4