intel/fs: Add a lowering pass for linear interpolation.

On gen11, instead of using a PLN instruction, we convert
FS_OPCODE_LINTERP to 2 or 4 multiply adds. That is done in the
fs_generator code.

This patch adds a lowering pass that does the same thing at the
fs_visitor. It also drops the usage of NF types, since we don't need the
extra precision and it lets us skip the accumulator. With all that, some
optimizations will still be run on the generated code, and we should get
better scheduling.

v2: Update comment about saturation and conditional mod (Matt)

Reviewed-by: Matt Turner <mattst88@gmail.com>
This commit is contained in:
Rafael Antognolli
2018-10-23 09:03:32 -07:00
parent c0504569ea
commit 9ea90aae1e
2 changed files with 47 additions and 0 deletions

View File

@@ -167,6 +167,7 @@ public:
bool lower_pack();
bool lower_regioning();
bool lower_logical_sends();
bool lower_linterp();
bool lower_integer_multiplication();
bool lower_minmax();
bool lower_simd_width();