summaryrefslogtreecommitdiff
path: root/ir_to_mesa.cpp
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2010-06-03 10:13:18 -0700
committerEric Anholt <eric@anholt.net>2010-06-24 15:05:21 -0700
commit4006424f5b5b3b189209faf03f2335f45c22b148 (patch)
tree8eb41f6e085e06e6cdfae2fe81c181444caf4be8 /ir_to_mesa.cpp
parenta9b619bb3b96a90d14650771dedaf1db840d70a6 (diff)
ir_to_mesa: Don't allocate temps for swizzles.
We do them in place by actually, you know, swizzling.
Diffstat (limited to 'ir_to_mesa.cpp')
-rw-r--r--ir_to_mesa.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/ir_to_mesa.cpp b/ir_to_mesa.cpp
index 56815ac8e1..53b7337d64 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) {