ir_to_mesa: Don't allocate temps for swizzles.
authorEric Anholt <eric@anholt.net>
Thu, 3 Jun 2010 17:13:18 +0000 (10:13 -0700)
committerEric Anholt <eric@anholt.net>
Thu, 24 Jun 2010 22:05:21 +0000 (15:05 -0700)
We do them in place by actually, you know, swizzling.

ir_to_mesa.cpp

index 56815ac..53b7337 100644 (file)
@@ -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) {