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>
(cherry picked from commit 335c48ab33)
This commit is contained in:
Gert Wollny 2020-11-21 15:59:33 +01:00 committed by Dylan Baker
parent 29f1078c18
commit 6adf918d34
2 changed files with 2 additions and 3 deletions

View file

@ -310,7 +310,7 @@
"description": "r600/sfn: lower bool to int32 only after common optimizations",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"master_sha": null,
"because_sha": "f79b7fcf7c7f5db626efdb63f27e8bc64d0aed77"
},

View file

@ -830,11 +830,10 @@ int r600_shader_from_nir(struct r600_context *rctx,
40,
r600_get_natural_size_align_bytes);
NIR_PASS_V(sel->nir, nir_lower_bool_to_int32);
while (optimize_once(sel->nir, true));
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);
if (sel->nir->info.stage == MESA_SHADER_FRAGMENT)