diff --git a/src/freedreno/ir3/ir3_nir.c b/src/freedreno/ir3/ir3_nir.c index 000455491fa..57a954aa348 100644 --- a/src/freedreno/ir3/ir3_nir.c +++ b/src/freedreno/ir3/ir3_nir.c @@ -1032,15 +1032,6 @@ ir3_nir_lower_variant(struct ir3_shader_variant *so, } } - if (so->binning_pass) { - if (OPT(s, lower_binning)) { - progress = true; - - /* outputs_written has changed. */ - nir_shader_gather_info(s, nir_shader_get_entrypoint(s)); - } - } - /* Note that it is intentional to use the VS lowering pass for GS, since we * lower GS into something that looks more like a VS in ir3_nir_lower_gs(): */ @@ -1051,6 +1042,15 @@ ir3_nir_lower_variant(struct ir3_shader_variant *so, progress |= OPT(s, nir_lower_clip_fs, so->key.ucp_enables, true, true); } + if (so->binning_pass) { + if (OPT(s, lower_binning)) { + progress = true; + + /* outputs_written has changed. */ + nir_shader_gather_info(s, nir_shader_get_entrypoint(s)); + } + } + /* Move large constant variables to the constants attached to the NIR * shader, which we will upload in the immediates range. This generates * amuls, so we need to clean those up after.