intel/fs/gen4-6: Allocate registers from aligned_pairs_class based on LINTERP use.
authorFrancisco Jerez <currojerez@riseup.net>
Fri, 3 Jan 2020 22:53:11 +0000 (14:53 -0800)
committerFrancisco Jerez <currojerez@riseup.net>
Fri, 17 Jan 2020 21:22:20 +0000 (13:22 -0800)
commit369aef851dda305ab8e769e3d9e18035a3c0d0df
treeef071aff771b11fb63ca12bd122794564a1c631c
parent54b1b71e7347fdca7900e11328d09931aec51c40
intel/fs/gen4-6: Allocate registers from aligned_pairs_class based on LINTERP use.

Previously we would hardcode fs_visitor::delta_xy barycentrics to be
allocated from aligned_pairs_class on hardware with PLN source
alignment restrictions (pre-Gen7).  Instead allocate any registers
consumed by LINTERP from aligned_pairs_class, even if some barycentric
vector had ended up in a temporary.

On SNB this prevents the following shader-db regressions (including
SIMD32 programs) in combination with the interpolation rework part of
this series:

   total instructions in shared programs: 13983257 -> 14527274 (3.89%)
   instructions in affected programs: 1766255 -> 2310272 (30.80%)
   helped: 0
   HURT: 11608

   LOST:   26
   GAINED: 13

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