intel/fs/gen6: Constrain barycentric source of LINTERP during bank conflict mitigation.
authorFrancisco Jerez <currojerez@riseup.net>
Tue, 31 Dec 2019 00:34:22 +0000 (16:34 -0800)
committerFrancisco Jerez <currojerez@riseup.net>
Fri, 17 Jan 2020 21:22:29 +0000 (13:22 -0800)
This avoids regressions on SNB due to the bank conflict mitigation
pass moving a VGRF-allocated barycentric vector to a misaligned
location, which would prevent the PLN instruction from being used.

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

index e908d0e38fc64ed88f32fe57f6b287b3d846d916..f10caf249d0f51cce35c6e7fd8f620fc8f859975 100644 (file)
@@ -567,6 +567,14 @@ namespace {
                constrained[p.atom_of_reg(reg_of(inst->src[i]))] = true;
          }
 
+         /* Preserve the original allocation of VGRFs used by the barycentric
+          * source of the LINTERP instruction on Gen6, since pair-aligned
+          * barycentrics allow the PLN instruction to be used.
+          */
+         if (v->devinfo->has_pln && v->devinfo->gen <= 6 &&
+             inst->opcode == FS_OPCODE_LINTERP)
+            constrained[p.atom_of_reg(reg_of(inst->src[0]))] = true;
+
          /* The location of the Gen7 MRF hack registers is hard-coded in the
           * rest of the compiler back-end.  Don't attempt to move them around.
           */