intel/fs/gen6: Use SEL instead of bashing thread payload for unlit centroid workaround.
authorFrancisco Jerez <currojerez@riseup.net>
Fri, 3 Jan 2020 23:58:05 +0000 (15:58 -0800)
committerFrancisco Jerez <currojerez@riseup.net>
Fri, 17 Jan 2020 21:22:39 +0000 (13:22 -0800)
commit9c9e80103ca2477d71e96750232da26028b4973d
treee9fb4cdd774f875db61465f8c0c1791aa3441ae8
parent0dd18d70aecd3bafb7dcde15430a024942fe243c
intel/fs/gen6: Use SEL instead of bashing thread payload for unlit centroid workaround.

This prevents regressions on SNB due to the redundant MOVs lying
around in cases where fetch_payload_reg() returns a VGRF (currently
only in SIMD32 but soon in pretty much all cases).  The MOVs can't be
register-coalesced due to their source being a FIXED_GRF, and they
can't be copy-propagated either due to the unlit centroid workaround
partial writes.  They can be copy-propagated just fine into a SEL
instruction though.

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: 13996898 -> 14001982 (0.04%)
   instructions in affected programs: 197461 -> 202545 (2.57%)
   helped: 0
   HURT: 1251

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