i965/eu: Set UIP on ELSE instructions on Broadwell.
authorKenneth Graunke <kenneth@whitecape.org>
Mon, 30 Jun 2014 15:05:42 +0000 (08:05 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 11 Aug 2014 02:32:34 +0000 (19:32 -0700)
Broadwell adds UIP on ELSE instructions.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_eu_emit.c

index e102d4b1c4aa3b49527b0b223d44c0b95b4cf8e5..3ab44333ec8270615337835dfbdac7a57e646177 100644 (file)
@@ -1391,6 +1391,12 @@ patch_IF_ELSE(struct brw_compile *p,
         /* The IF instruction's UIP and ELSE's JIP should point to ENDIF */
          brw_inst_set_uip(brw, if_inst, br * (endif_inst - if_inst));
          brw_inst_set_jip(brw, else_inst, br * (endif_inst - else_inst));
+         if (brw->gen >= 8) {
+            /* Since we don't set branch_ctrl, the ELSE's JIP and UIP both
+             * should point to ENDIF.
+             */
+            brw_inst_set_uip(brw, else_inst, br * (endif_inst - else_inst));
+         }
       }
    }
 }