Some instructions generated by int/bool float lowering need to be lowered
by opt_algebraic.
Fixes: 43dbd7d6
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
if (binning)
cleanup_binning(ctx);
if (binning)
cleanup_binning(ctx);
- /* postprocess */
- OPT_V(ctx->nir, nir_opt_algebraic_late);
-
OPT_V(ctx->nir, nir_copy_prop);
OPT_V(ctx->nir, nir_opt_dce);
OPT_V(ctx->nir, nir_opt_move, nir_move_comparisons);
OPT_V(ctx->nir, nir_lower_int_to_float);
OPT_V(ctx->nir, nir_lower_bool_to_float);
OPT_V(ctx->nir, nir_copy_prop);
OPT_V(ctx->nir, nir_opt_dce);
OPT_V(ctx->nir, nir_opt_move, nir_move_comparisons);
OPT_V(ctx->nir, nir_lower_int_to_float);
OPT_V(ctx->nir, nir_lower_bool_to_float);
+ while(OPT(ctx->nir, nir_opt_algebraic));
+ OPT_V(ctx->nir, nir_opt_algebraic_late);
OPT_V(ctx->nir, nir_lower_to_source_mods, nir_lower_all_source_mods);
OPT_V(ctx->nir, nir_lower_alu_to_scalar, ir2_alu_to_scalar_filter_cb, NULL);
OPT_V(ctx->nir, nir_lower_to_source_mods, nir_lower_all_source_mods);
OPT_V(ctx->nir, nir_lower_alu_to_scalar, ir2_alu_to_scalar_filter_cb, NULL);