r600/sfn: run late algebraic optimizations
authorGert Wollny <gert.wollny@collabora.com>
Tue, 22 Sep 2020 07:01:48 +0000 (09:01 +0200)
committerMarge Bot <eric+marge@anholt.net>
Tue, 22 Sep 2020 14:32:45 +0000 (14:32 +0000)
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6814>

src/gallium/drivers/r600/sfn/sfn_nir.cpp

index 091f4ff..d774943 100644 (file)
@@ -803,7 +803,10 @@ int r600_shader_from_nir(struct r600_context *rctx,
 
    auto sh = nir_shader_clone(sel->nir, sel->nir);
 
+   NIR_PASS_V(sh, nir_opt_algebraic_late);
+
    NIR_PASS_V(sh, nir_lower_locals_to_regs);
+
    //NIR_PASS_V(sel->nir, nir_opt_algebraic);
    //NIR_PASS_V(sel->nir, nir_copy_prop);
    NIR_PASS_V(sh, nir_lower_to_source_mods, nir_lower_float_source_mods);