ir3,freedreno: remove binning outputs after vs ucp lowering
nir_lower_clip_vs relies on VARYING_SLOT_CLIP_VERTEX which gets removed
when removing the outputs that are unused by the binning vs. Fix this by
only removing the outputs after running nir_lower_clip_vs.
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12328
Fixes: 24b422dc3e
("ir3: remove unused outputs for binning pass in NIR")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32727>
This commit is contained in:
@@ -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.
|
||||
|
Reference in New Issue
Block a user