Mesa (master): st/mesa: lower global vars to local after lowering clip

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Oct 28 22:32:09 UTC 2019


Module: Mesa
Branch: master
Commit: 21b7f79a76923359237cbdbdfe6d1ffede4a34e4
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=21b7f79a76923359237cbdbdfe6d1ffede4a34e4

Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date:   Mon Oct 28 14:02:02 2019 +0100

st/mesa: lower global vars to local after lowering clip

When this code was merged, this wasn't necessary because the
state-tracker would do it later anyway. But this recently got changed,
without changing the code that depended on this.

Arguably, this was a mistake in the lowering pass to begin with. Either
way, let's fix it by not assuming that the lowering code gets called
later when it's not needed.

This fixed user-defined clip-planes in Zink.

Signed-off-by: Erik Faye-Lund <erik.faye-lund at collabora.com>
Fixes: eaffdad1082 ("st/mesa: don't lower_global_vars_to_local for VS if there are no dead inputs")
Reviewed-by: Marek Olšák <marek.olsak at amd.com>

---

 src/mesa/state_tracker/st_program.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c
index e72586ec870..6beb1ced785 100644
--- a/src/mesa/state_tracker/st_program.c
+++ b/src/mesa/state_tracker/st_program.c
@@ -726,6 +726,7 @@ st_create_vp_variant(struct st_context *st,
                     true, can_compact, clipplane_state);
          NIR_PASS_V(state.ir.nir, nir_lower_io_to_temporaries,
                     nir_shader_get_entrypoint(state.ir.nir), true, false);
+         NIR_PASS_V(state.ir.nir, nir_lower_global_vars_to_local);
          finalize = true;
       }
 




More information about the mesa-commit mailing list