i965: Eliminate brw_set_conditionalmod from the Gen4-5 compilers.
[mesa.git] / src / mesa / drivers / dri / i965 / brw_clip_tri.c
index 9118cf79e48af89699ad86bf4959a49aafc545ef..77cae290c654213cc73a6eec50d51eedddf44e05 100644 (file)
@@ -237,8 +237,8 @@ load_clip_distance(struct brw_clip_compile *c, struct brw_indirect vtx,
    struct brw_compile *p = &c->func;
 
    dst = vec4(dst);
-   brw_set_conditionalmod(p, BRW_CONDITIONAL_NZ);
    brw_AND(p, vec1(brw_null_reg()), c->reg.vertex_src_mask, brw_imm_ud(1));
+   brw_last_inst->header.destreg__conditionalmod = BRW_CONDITIONAL_NZ;
    brw_IF(p, BRW_EXECUTE_1);
    {
       struct brw_indirect temp_ptr = brw_indirect(7, 0);
@@ -293,8 +293,8 @@ void brw_clip_tri( struct brw_clip_compile *c )
    {
       /* if (planemask & 1)
        */
-      brw_set_conditionalmod(p, BRW_CONDITIONAL_NZ);
       brw_AND(p, vec1(brw_null_reg()), c->reg.planemask, brw_imm_ud(1));
+      brw_last_inst->header.destreg__conditionalmod = BRW_CONDITIONAL_NZ;
 
       brw_IF(p, BRW_EXECUTE_1);
       {
@@ -403,8 +403,8 @@ void brw_clip_tri( struct brw_clip_compile *c )
 
            /* while (--loopcount != 0)
             */
-           brw_set_conditionalmod(p, BRW_CONDITIONAL_NZ);
            brw_ADD(p, c->reg.loopcount, c->reg.loopcount, brw_imm_d(-1));
+            brw_last_inst->header.destreg__conditionalmod = BRW_CONDITIONAL_NZ;
         }
         brw_WHILE(p);
          brw_last_inst->header.predicate_control = BRW_PREDICATE_NORMAL;
@@ -437,8 +437,8 @@ void brw_clip_tri( struct brw_clip_compile *c )
 
       /* && (planemask>>=1) != 0
        */
-      brw_set_conditionalmod(p, BRW_CONDITIONAL_NZ);
       brw_SHR(p, c->reg.planemask, c->reg.planemask, brw_imm_ud(1));
+      brw_last_inst->header.destreg__conditionalmod = BRW_CONDITIONAL_NZ;
       brw_SHR(p, c->reg.vertex_src_mask, c->reg.vertex_src_mask, brw_imm_ud(1));
       brw_ADD(p, c->reg.clipdistance_offset, c->reg.clipdistance_offset, brw_imm_w(sizeof(float)));
    }
@@ -453,11 +453,11 @@ void brw_clip_tri_emit_polygon(struct brw_clip_compile *c)
 
    /* for (loopcount = nr_verts-2; loopcount > 0; loopcount--)
     */
-   brw_set_conditionalmod(p, BRW_CONDITIONAL_G);
    brw_ADD(p,
           c->reg.loopcount,
           c->reg.nr_verts,
           brw_imm_d(-2));
+   brw_last_inst->header.destreg__conditionalmod = BRW_CONDITIONAL_G;
 
    brw_IF(p, BRW_EXECUTE_1);
    {
@@ -482,8 +482,8 @@ void brw_clip_tri_emit_polygon(struct brw_clip_compile *c)
         brw_ADD(p, get_addr_reg(vptr), get_addr_reg(vptr), brw_imm_uw(2));
         brw_MOV(p, get_addr_reg(v0), deref_1uw(vptr, 0));
 
-        brw_set_conditionalmod(p, BRW_CONDITIONAL_NZ);
         brw_ADD(p, c->reg.loopcount, c->reg.loopcount, brw_imm_d(-1));
+         brw_last_inst->header.destreg__conditionalmod = BRW_CONDITIONAL_NZ;
       }
       brw_WHILE(p);
       brw_last_inst->header.predicate_control = BRW_PREDICATE_NORMAL;
@@ -555,8 +555,8 @@ static void brw_clip_test( struct brw_clip_compile *c )
     brw_AND(p, t, t, t3);
     brw_OR(p, tmp0, get_element(t, 0), get_element(t, 1));
     brw_OR(p, tmp0, tmp0, get_element(t, 2));
-    brw_set_conditionalmod(p, BRW_CONDITIONAL_NZ);
     brw_AND(p, brw_null_reg(), tmp0, brw_imm_ud(0x1));
+    brw_last_inst->header.destreg__conditionalmod = BRW_CONDITIONAL_NZ;
     brw_IF(p, BRW_EXECUTE_1);
     {
         brw_clip_kill_thread(c);
@@ -593,8 +593,8 @@ static void brw_clip_test( struct brw_clip_compile *c )
     brw_AND(p, t, t, t3);
     brw_OR(p, tmp0, get_element(t, 0), get_element(t, 1));
     brw_OR(p, tmp0, tmp0, get_element(t, 2));
-    brw_set_conditionalmod(p, BRW_CONDITIONAL_NZ);
     brw_AND(p, brw_null_reg(), tmp0, brw_imm_ud(0x1));
+    brw_last_inst->header.destreg__conditionalmod = BRW_CONDITIONAL_NZ;
     brw_IF(p, BRW_EXECUTE_1);
     {
         brw_clip_kill_thread(c);
@@ -636,9 +636,9 @@ void brw_emit_tri_clip( struct brw_clip_compile *c )
    /* if -ve rhw workaround bit is set,
       do cliptest */
    if (brw->has_negative_rhw_bug) {
-      brw_set_conditionalmod(p, BRW_CONDITIONAL_NZ);
       brw_AND(p, brw_null_reg(), get_element_ud(c->reg.R0, 2),
               brw_imm_ud(1<<20));
+      brw_last_inst->header.destreg__conditionalmod = BRW_CONDITIONAL_NZ;
       brw_IF(p, BRW_EXECUTE_1);
       {
          brw_clip_test(c);