[Mesa-dev] [PATCH 08/11] i965/eu: Set UIP on ELSE instructions on Broadwell.

Kenneth Graunke kenneth at whitecape.org
Sat Aug 9 14:28:48 PDT 2014


Broadwell adds UIP on ELSE instructions.

Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
---
 src/mesa/drivers/dri/i965/brw_eu_emit.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/brw_eu_emit.c b/src/mesa/drivers/dri/i965/brw_eu_emit.c
index 214ff0a..665fc07 100644
--- a/src/mesa/drivers/dri/i965/brw_eu_emit.c
+++ b/src/mesa/drivers/dri/i965/brw_eu_emit.c
@@ -1434,6 +1434,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));
+         }
       }
    }
 }
-- 
2.0.0



More information about the mesa-dev mailing list