Mesa (master): Revert "freedreno/ir3: Use get_once() for one-time init"

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Nov 25 10:06:38 UTC 2020


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

Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date:   Tue Nov 24 23:34:51 2020 +0100

Revert "freedreno/ir3: Use get_once() for one-time init"

This reverts commit b4ad27a986e1c6899cbf23355c3e9c6de345a323.

Acked-by: Rob Clark <robdclark at chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7760>

---

 src/freedreno/ir3/ir3_nir.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/freedreno/ir3/ir3_nir.c b/src/freedreno/ir3/ir3_nir.c
index cf2603af963..8a3f768d995 100644
--- a/src/freedreno/ir3/ir3_nir.c
+++ b/src/freedreno/ir3/ir3_nir.c
@@ -204,8 +204,9 @@ ir3_optimize_loop(nir_shader *s)
 		progress |= OPT(s, nir_copy_prop);
 		progress |= OPT(s, nir_opt_dce);
 		progress |= OPT(s, nir_opt_cse);
-
-		int gcm = get_once(env_var_as_unsigned("GCM", 0));
+		static int gcm = -1;
+		if (gcm == -1)
+			gcm = env_var_as_unsigned("GCM", 0);
 		if (gcm == 1)
 			progress |= OPT(s, nir_opt_gcm, true);
 		else if (gcm == 2)



More information about the mesa-commit mailing list