Don't let swizzles with duplicated components be considered as lvalues.
authorEric Anholt <eric@anholt.net>
Sun, 28 Mar 2010 08:29:18 +0000 (01:29 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Mon, 29 Mar 2010 19:48:45 +0000 (12:48 -0700)
Fixes swizzle2.frag.

ir.h

diff --git a/ir.h b/ir.h
index 600a2cd78de0b1eb76d21b6e688c0f588df9439e..3ef37083697fca2ad143c87052c197ce0100bad5 100644 (file)
--- a/ir.h
+++ b/ir.h
@@ -432,7 +432,7 @@ public:
 
    bool is_lvalue()
    {
-      return val->is_lvalue();
+      return val->is_lvalue() && !mask.has_duplicates;
    }
 
    ir_rvalue *val;