From: Antia Puentes Date: Thu, 12 Mar 2015 12:59:17 +0000 (+0100) Subject: i965: Emit IF/ELSE/ENDIF/WHILE JIP with type W on Gen7 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9735a62a2c6007e7ee7baa5a769575a0adb5fda3;p=mesa.git i965: Emit IF/ELSE/ENDIF/WHILE JIP with type W on Gen7 IvyBridge and Haswell PRM say that the JIP should be emitted with type W but we were using UD. The previous implementation did not show adverse effects, but IMHO it is safer to follow the specification thoroughly. Reviewed-by: Matt Turner Signed-off-by: Antia Puentes --- diff --git a/src/mesa/drivers/dri/i965/brw_eu_emit.c b/src/mesa/drivers/dri/i965/brw_eu_emit.c index 43e578389ef..1ca79a94304 100644 --- a/src/mesa/drivers/dri/i965/brw_eu_emit.c +++ b/src/mesa/drivers/dri/i965/brw_eu_emit.c @@ -1332,7 +1332,7 @@ brw_IF(struct brw_compile *p, unsigned execute_size) } else if (brw->gen == 7) { brw_set_dest(p, insn, vec1(retype(brw_null_reg(), BRW_REGISTER_TYPE_D))); brw_set_src0(p, insn, vec1(retype(brw_null_reg(), BRW_REGISTER_TYPE_D))); - brw_set_src1(p, insn, brw_imm_ud(0)); + brw_set_src1(p, insn, brw_imm_w(0)); brw_inst_set_jip(brw, insn, 0); brw_inst_set_uip(brw, insn, 0); } else { @@ -1533,7 +1533,7 @@ brw_ELSE(struct brw_compile *p) } else if (brw->gen == 7) { brw_set_dest(p, insn, retype(brw_null_reg(), BRW_REGISTER_TYPE_D)); brw_set_src0(p, insn, retype(brw_null_reg(), BRW_REGISTER_TYPE_D)); - brw_set_src1(p, insn, brw_imm_ud(0)); + brw_set_src1(p, insn, brw_imm_w(0)); brw_inst_set_jip(brw, insn, 0); brw_inst_set_uip(brw, insn, 0); } else { @@ -1610,7 +1610,7 @@ brw_ENDIF(struct brw_compile *p) } else if (brw->gen == 7) { brw_set_dest(p, insn, retype(brw_null_reg(), BRW_REGISTER_TYPE_D)); brw_set_src0(p, insn, retype(brw_null_reg(), BRW_REGISTER_TYPE_D)); - brw_set_src1(p, insn, brw_imm_ud(0)); + brw_set_src1(p, insn, brw_imm_w(0)); } else { brw_set_src0(p, insn, brw_imm_d(0)); } @@ -1802,7 +1802,7 @@ brw_WHILE(struct brw_compile *p) } else if (brw->gen == 7) { brw_set_dest(p, insn, retype(brw_null_reg(), BRW_REGISTER_TYPE_D)); brw_set_src0(p, insn, retype(brw_null_reg(), BRW_REGISTER_TYPE_D)); - brw_set_src1(p, insn, brw_imm_ud(0)); + brw_set_src1(p, insn, brw_imm_w(0)); brw_inst_set_jip(brw, insn, br * (do_insn - insn)); } else { brw_set_dest(p, insn, brw_imm_w(0));