intel/fs: Add more efficient fragment coordinate calculation.
authorFrancisco Jerez <currojerez@riseup.net>
Tue, 6 Apr 2021 20:11:33 +0000 (13:11 -0700)
committerMarge Bot <eric+marge@anholt.net>
Fri, 16 Apr 2021 08:27:35 +0000 (08:27 +0000)
commita2572a9da49561af2d8dafce44bbb50c80505531
treea646178497206cde81d75e10a39bb056da85cc14
parenta0e0dfe1743c703e718e509e7c2096d1b6e3dc95
intel/fs: Add more efficient fragment coordinate calculation.

The PIXEL_X/Y opcodes used by the current implementation are broken on
XeHP due to the new regioning restrictions of the floating-point pipe.
We could have the regioning lowering pass fix it in theory by lowering
the conversions into separate MOV instructions, but that would be more
costly than this implementation that only needs a pair of pipelined
ADDs and a pair of pipelined MOVs.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10000>
src/intel/compiler/brw_fs_visitor.cpp