Mesa (master): i965: Don't strip negate/ abs flags when assigning uniform locations.

Eric Anholt anholt at kemper.freedesktop.org
Fri Aug 27 21:44:19 UTC 2010


Module: Mesa
Branch: master
Commit: d20c2766182b632fba296eff7328bf14c802096e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d20c2766182b632fba296eff7328bf14c802096e

Author: Eric Anholt <eric at anholt.net>
Date:   Fri Aug 27 14:15:42 2010 -0700

i965: Don't strip negate/abs flags when assigning uniform locations.

Fixes glsl-algebraic-sub-zero-4.

---

 src/mesa/drivers/dri/i965/brw_fs.cpp |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index 63f3cd0..63eae84 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -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;
 	 }
       }
    }




More information about the mesa-commit mailing list