intel/eu/gen12: Don't set thread control, it's gone.
authorFrancisco Jerez <currojerez@riseup.net>
Fri, 27 Sep 2019 06:36:58 +0000 (23:36 -0700)
committerFrancisco Jerez <currojerez@riseup.net>
Fri, 11 Oct 2019 19:24:16 +0000 (12:24 -0700)
An effect similar to the one formerly provided by setting thread
control to "switch" can be achieved now by setting a RegDist of 1 on
the SWSB field.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/intel/compiler/brw_eu_emit.c

index 323ba20..7bbc5d3 100644 (file)
@@ -3555,12 +3555,14 @@ brw_float_controls_mode(struct brw_codegen *p,
     *   thread control field to ‘switch’ for an instruction that uses
     *   control register as an explicit operand."
     */
-   brw_inst_set_thread_control(p->devinfo, inst, BRW_THREAD_SWITCH);
+   if (p->devinfo->gen < 12)
+      brw_inst_set_thread_control(p->devinfo, inst, BRW_THREAD_SWITCH);
 
    if (mode) {
       brw_inst *inst_or = brw_OR(p, brw_cr0_reg(0), brw_cr0_reg(0),
                                  brw_imm_ud(mode));
       brw_inst_set_exec_size(p->devinfo, inst_or, BRW_EXECUTE_1);
-      brw_inst_set_thread_control(p->devinfo, inst_or, BRW_THREAD_SWITCH);
+      if (p->devinfo->gen < 12)
+         brw_inst_set_thread_control(p->devinfo, inst_or, BRW_THREAD_SWITCH);
    }
 }