nir: Lower ldexp to arithmetic.
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 20 Jan 2016 01:40:58 +0000 (17:40 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 20 Jan 2016 02:10:30 +0000 (18:10 -0800)
commite79f8a4926dc79e32531f705b2db3bbd2d3984f4
treea4c09b7ad0e2ba5ed0685fb1264b208e821bd4a5
parentb3cc10f3b24527e06da175cb8422f1e4f301cd87
nir: Lower ldexp to arithmetic.

This is a port of Matt's GLSL IR lowering pass to NIR.  It's required
because we translate SPIR-V directly to NIR, bypassing GLSL IR.

I haven't introduced a lower_ldexp flag, as I believe all current NIR
consumers would set the flag.  i965 wants this, vc4 doesn't implement
this feature, and st_glsl_to_tgsi currently lowers ldexp
unconditionally anyway.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
src/glsl/nir/nir_opt_algebraic.py