i965/fs: Try to emit LINE instructions on Gen <= 5.
authorMatt Turner <mattst88@gmail.com>
Tue, 1 Apr 2014 23:49:13 +0000 (16:49 -0700)
committerMatt Turner <mattst88@gmail.com>
Sat, 6 Dec 2014 00:43:31 +0000 (16:43 -0800)
commit963a3c7f90672c8d4931606d45e172792caf84ca
tree20bca8068acf42adf41a539fd250a75c792b5cb6
parent6be863af0eda114e0225dfa8b68aa11b6e84d73c
i965/fs: Try to emit LINE instructions on Gen <= 5.

The LINE instruction performs a multiply-add instruction (a * b + c)
where b and c are scalar arguments. It reads b and c from offsets in
src0 such that you can load them (it they're representable) as a
vector-float immediate with a single instruction.

Hurts some programs, but that'll all get better once we CSE the
vector-float MOVs in the next patch.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=77544
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/drivers/dri/i965/brw_fs.h
src/mesa/drivers/dri/i965/brw_fs_visitor.cpp