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 600a2cd..3ef3708 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;