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

index 14c3b936b7eb03abb088148e51ed7e2ae91e0e3b..d16e916832e7c95a592816fd33932a4725219cb0 100644 (file)
@@ -384,9 +384,8 @@ static void emit_sop( struct brw_vs_compile *c,
 {
    struct brw_compile *p = &c->func;
 
-   brw_MOV(p, dst, brw_imm_f(0.0f));
-   brw_CMP(p, brw_null_reg(), cond, arg0, arg1);
-   brw_MOV(p, dst, brw_imm_f(1.0f));
+   brw_CMP(p, brw_null_reg(), cond, arg1, arg0);
+   brw_SEL(p, dst, brw_null_reg(), brw_imm_f(1.0f));
    brw_set_predicate_control_flag_value(p, 0xff);
 }