i965: Do FS SLT, SGT, and friends using CMP, SEL instead of CMP, MOV, MOV.
authorEric Anholt <eric@anholt.net>
Thu, 11 Mar 2010 01:38:33 +0000 (17:38 -0800)
committerEric Anholt <eric@anholt.net>
Fri, 12 Mar 2010 23:12:01 +0000 (15:12 -0800)
src/mesa/drivers/dri/i965/brw_wm_emit.c

index 3a4057bb6b876f5ed8863c859c2f50cca67a0721..438fcc7178dc6afb13d0f4b2c9166d7a901f0590 100644 (file)
@@ -534,11 +534,8 @@ void emit_sop(struct brw_compile *p,
    for (i = 0; i < 4; i++) {
       if (mask & (1<<i)) {     
         brw_push_insn_state(p);
-        brw_CMP(p, brw_null_reg(), cond, arg0[i], arg1[i]);
-        brw_set_predicate_control(p, BRW_PREDICATE_NONE);
-        brw_MOV(p, dst[i], brw_imm_f(0));
-        brw_set_predicate_control(p, BRW_PREDICATE_NORMAL);
-        brw_MOV(p, dst[i], brw_imm_f(1.0));
+        brw_CMP(p, brw_null_reg(), cond, arg1[i], arg0[i]);
+        brw_SEL(p, dst[i], brw_null_reg(), brw_imm_f(1.0));
         brw_pop_insn_state(p);
       }
    }