i965: Use LOAD_PAYLOAD for SIMD8 TES input loads, not MOV.
authorKenneth Graunke <kenneth@whitecape.org>
Mon, 28 Dec 2015 00:14:11 +0000 (16:14 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Sun, 3 Jan 2016 02:46:16 +0000 (18:46 -0800)
commitb022150d70a1cfdda2007fa16b04c601eef45d6f
tree9553bfe2d64f949819496c8bd1d656afa47a93d4
parent53a9b6223f4ebf66e8892e04ffe47eb5586eda5c
i965: Use LOAD_PAYLOAD for SIMD8 TES input loads, not MOV.

We need a MOV to replicate g0.0<0,1,0> to all 8 channels.  Since the
message payload is a single register, MOV seemed more sensible than
LOAD_PAYLOAD.  However, MOV cannot be CSE'd, while LOAD_PAYLOAD can.

All input loads can use the same header - we don't need to re-expand
g0 every time.  CSE accomplishes this, saving instructions.

shader-db statistics for files containing tessellation shaders:

total instructions in shared programs: 186923 -> 184358 (-1.37%)
instructions in affected programs: 30536 -> 27971 (-8.40%)
helped: 226
HURT: 0

total cycles in shared programs: 1009850 -> 1005356 (-0.45%)
cycles in affected programs: 168206 -> 163712 (-2.67%)
helped: 226
HURT: 0

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_fs_nir.cpp