r600/sfn: lower bool to int32 only after common optimizations

Fixes: f79b7fcf7c
   r600/sfn: use 32 bit bools

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7714>
This commit is contained in:
Gert Wollny
2020-11-21 15:59:33 +01:00
committed by Marge Bot
parent 5b77b14448
commit 335c48ab33

View File

@@ -832,11 +832,10 @@ int r600_shader_from_nir(struct r600_context *rctx,
40, 40,
r600_get_natural_size_align_bytes); r600_get_natural_size_align_bytes);
NIR_PASS_V(sel->nir, nir_lower_bool_to_int32);
while (optimize_once(sel->nir, true)); while (optimize_once(sel->nir, true));
auto sh = nir_shader_clone(sel->nir, sel->nir); auto sh = nir_shader_clone(sel->nir, sel->nir);
NIR_PASS_V(sel->nir, nir_lower_bool_to_int32);
NIR_PASS_V(sh, nir_opt_algebraic_late); NIR_PASS_V(sh, nir_opt_algebraic_late);
if (sel->nir->info.stage == MESA_SHADER_FRAGMENT) if (sel->nir->info.stage == MESA_SHADER_FRAGMENT)