gallivm/nir: Call nir_lower_bool_to_int32 after nir_opt_algebraic_late
authorIan Romanick <ian.d.romanick@intel.com>
Wed, 9 Feb 2022 01:53:02 +0000 (17:53 -0800)
committerMarge Bot <emma+marge@anholt.net>
Thu, 10 Feb 2022 03:12:46 +0000 (03:12 +0000)
commite3cbc328e0dbb5865cc036ecbf977127850b4670
tree2516f2a3f630f7350fbeebc3bb17bc07f070122f
parentd633eace3fd51fc5c2b7f141651bb8d90e879e1c
gallivm/nir: Call nir_lower_bool_to_int32 after nir_opt_algebraic_late

All of the opcodes in nir_opt_algebraic_late are the unsized (1-bit)
versions.  If the lowering to int32 happens first, many of the
optimizations and lowerings won't happen.

Of particular importance is the lowering of fisfinite.  If a shader
happens to contain fisfinite of an fp16 value, it will assert later
during compliation.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Fixes: 78b4e417d44 ("gallivm: handle fisfinite/fisnormal")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14942>
src/gallium/auxiliary/gallivm/lp_bld_nir.c