nir: remove bool lowering from lower_int_to_float
authorJonathan Marek <jonathan@marek.ca>
Fri, 31 May 2019 20:17:06 +0000 (16:17 -0400)
committerJonathan Marek <jonathan@marek.ca>
Fri, 31 May 2019 21:35:26 +0000 (21:35 +0000)
commitf387c2b238804b8c2d4df5473055852374c775af
treeda666e91f300db6bf3dc25335e257e6c8c1b7feb
parentf6579ee2043094dc36a0627e4e66c82e78aaf73b
nir: remove bool lowering from lower_int_to_float

Removes the bool_to_float logic from the int_to_float pass, so that both
can be used separately. By having separate passes we have better validation
and it makes it possible to use with the lower_ftrunc option (int lowering
generates ftrunc, but lower_ftrunc generates bools, ftrunc lowering should
probably be reworked). For now we always expect lower_bool to come after
lower_int.

Also fixes f2i32 to become ftrunc and adds u2f/f2u cases.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/nir/nir_lower_int_to_float.c
src/gallium/drivers/freedreno/a2xx/ir2_nir.c
src/gallium/drivers/lima/lima_program.c