i965/vec4/nir: Emit single MOV to generate a scalar constant.
authorMatt Turner <mattst88@gmail.com>
Wed, 12 Aug 2015 18:35:17 +0000 (11:35 -0700)
committerMatt Turner <mattst88@gmail.com>
Mon, 17 Aug 2015 21:10:15 +0000 (14:10 -0700)
commit2450cbfcbc3671056afad9e858acadbb6edea068
tree9da54d45279b456cd7ffbc83a900d08d1828f588
parent5af71fb5ac4dafed3ecc4b849922208cab76070f
i965/vec4/nir: Emit single MOV to generate a scalar constant.

If an immediate is written to multiple channels, we can load it in a
single writemasked MOV.

total instructions in shared programs: 6285144 -> 6261991 (-0.37%)
instructions in affected programs:     718991 -> 695838 (-3.22%)
helped:                                5762

Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
src/mesa/drivers/dri/i965/brw_vec4_nir.cpp