Mesa (staging/19.2): freedreno/a2xx: ir2: fix lowering of instructions after float lowering
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Sep 6 15:35:10 UTC 2019
Module: Mesa
Branch: staging/19.2
Commit: f42a4300aae1fc1cae74808b3ae01953316d3973
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f42a4300aae1fc1cae74808b3ae01953316d3973
Author: Jonathan Marek <jonathan at marek.ca>
Date: Wed Sep 4 15:18:09 2019 -0400
freedreno/a2xx: ir2: fix lowering of instructions after float lowering
Some instructions generated by int/bool float lowering need to be lowered
by opt_algebraic.
Fixes: 43dbd7d6
Signed-off-by: Jonathan Marek <jonathan at marek.ca>
Reviewed-by: Rob Clark <robdclark at chromium.org>
Reviewed-by: Eric Anholt <eric at anholt.net>
(cherry picked from commit 3516a90ab4842a6610dc31514809d490bc4add87)
---
src/gallium/drivers/freedreno/a2xx/ir2_nir.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/gallium/drivers/freedreno/a2xx/ir2_nir.c b/src/gallium/drivers/freedreno/a2xx/ir2_nir.c
index 9d36f7092ef..b3534eee4a1 100644
--- a/src/gallium/drivers/freedreno/a2xx/ir2_nir.c
+++ b/src/gallium/drivers/freedreno/a2xx/ir2_nir.c
@@ -1074,15 +1074,14 @@ ir2_nir_compile(struct ir2_context *ctx, bool binning)
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);
+ 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);
/* TODO: static bitset ? */
More information about the mesa-commit
mailing list