i965: Emit ELSE/ENDIF JIP with type D on Gen 7.
authorMatt Turner <mattst88@gmail.com>
Thu, 28 Aug 2014 01:40:46 +0000 (18:40 -0700)
committerMatt Turner <mattst88@gmail.com>
Thu, 25 Sep 2014 18:02:36 +0000 (11:02 -0700)
The spec says the type must be W (JIP is 16-bits after all), but we've
been emitting it with a UD type all along and have experienced no
adverse effects. Changing the type to D allows ELSE and ENDIF
instructions to be compacted.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
src/mesa/drivers/dri/i965/brw_eu_emit.c

index 937257b20a520641b1b4f29142e8869921d9b4e2..15e1da7a6868cf99fe1a1f7752afacdb4cd8a7c7 100644 (file)
@@ -1496,7 +1496,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_d(0));
       brw_inst_set_jip(brw, insn, 0);
       brw_inst_set_uip(brw, insn, 0);
    } else {
@@ -1573,7 +1573,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_d(0));
    } else {
       brw_set_src0(p, insn, brw_imm_d(0));
    }