i965: Don't strip negate/abs flags when assigning uniform locations.
authorEric Anholt <eric@anholt.net>
Fri, 27 Aug 2010 21:15:42 +0000 (14:15 -0700)
committerEric Anholt <eric@anholt.net>
Fri, 27 Aug 2010 21:42:35 +0000 (14:42 -0700)
Fixes glsl-algebraic-sub-zero-4.

src/mesa/drivers/dri/i965/brw_fs.cpp

index 63f3cd08162040e571d5bac02d4f434883f5ffe8..63eae840c2769e69f548f9e8374dd71eb764d57f 100644 (file)
@@ -1336,12 +1336,12 @@ fs_visitor::assign_curb_setup()
       for (unsigned int i = 0; i < 3; i++) {
         if (inst->src[i].file == UNIFORM) {
            int constant_nr = inst->src[i].hw_reg + inst->src[i].reg_offset;
-           struct brw_reg brw_reg;
+           struct brw_reg brw_reg = brw_vec1_grf(c->prog_data.first_curbe_grf +
+                                                 constant_nr / 8,
+                                                 constant_nr % 8);
 
-           brw_reg = brw_vec1_grf(c->prog_data.first_curbe_grf +
-                                  constant_nr / 8,
-                                  constant_nr % 8);
-           inst->src[i] = fs_reg(brw_reg);
+           inst->src[i].file = FIXED_HW_REG;
+           inst->src[i].fixed_hw_reg = brw_reg;
         }
       }
    }