i965: Use LZD to implement nir_op_ifind_msb on Gen < 7
authorIan Romanick <ian.d.romanick@intel.com>
Wed, 22 Jun 2016 00:18:04 +0000 (17:18 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Tue, 19 Jul 2016 19:19:29 +0000 (12:19 -0700)
commitc2019c6c261d5c46a4e5d3edc88836bcedf75f30
tree8bc7edcf73d6ceecc51c14b23dd40282ebcaa941
parentde20086eed47e6bfe7c25835d72383114f99c7a9
i965: Use LZD to implement nir_op_ifind_msb on Gen < 7

v2: Retype LZD source as UD to avoid potential problems with 0x80000000.
Suggested by Matt.  Also update comment about problem values with
LZD(abs(x)).  Suggested by Curro.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_fs_nir.cpp
src/mesa/drivers/dri/i965/brw_vec4_nir.cpp